首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux 批改文件中某一行

2012-08-13 
linux 修改文件中某一行sed -i1s/oldstr/newstr/ filename示例:config文件:[wusx@centos245 gather]$ ca

linux 修改文件中某一行

sed -i  "1s/oldstr/newstr/" filename示例:config文件:[wusx@centos245 gather]$ 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
?

热点排行