wushexin 发表于 2013-2-4 14:41:30

linux 修改文件中某一行

sed -i"1s/oldstr/newstr/" filename示例:config文件:$ cat config start=359822end=550000threads=15output=/home/wusx/gather/outputlog=/home/wusx/gather/_wget.log#将当前下的文档序列,写回config文件。sed -i "1s/start=$(($i-1))/start=$i/" /home/wusx/gather/config
页: [1]
查看完整版本: linux 修改文件中某一行