昨天花了一下午的时间,终于搞定了sed多行的问题,开心!

来源:互联网 发布:js幻灯片效果代码 编辑:程序博客网 时间:2024/06/11 03:50

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

-------------------------------------------------------------------------------------------------------------------------------------------- 

原创粉丝点击