ok.sh:
--------------------------------------------------------------------------------------------------------------------------------------------
#sed "/^/[tool_path/][ /t]*/N;s/^/[tool_path/][ /t/n]*.*$//[tool_path/]/n//usr//bin//arm-linux-/" tools.cfg
TOOL=${TOOL:=/usr/bin/arm-linux-}
echo TOOL = $TOOL
TOOL1=`echo $TOOL |sed 's///////////g'`
sed '/^/[tool_path/][ /t]*/N;s/^/[tool_path/][ /t/n]*.*$//[tool_path/]/n'${TOOL1}'/' tools.cfg
--------------------------------------------------------------------------------------------------------------------------------------------
配置ARM工具链
本文介绍了一个用于配置ARM工具链的shell脚本示例。通过修改工具路径和使用sed命令进行字符串替换,实现了对配置文件tools.cfg中指定路径的更新。此脚本适用于嵌入式系统开发环境。

被折叠的 条评论
为什么被折叠?



