linux文件行首行尾添加或替换 sed -i 's/(^.*)/http://www.blutmagie.de/img/flags//g' cc.txt sed -i 's/($)/.gif/g' cc.txt