e****e 发帖数: 179 | 1 when I use sed to replace a string in a file, it only shows on the screen that
string has been changed, but when I open that file, it is still the same as
before.
the command I used is:
sed -e 's,oldstr,newstr,' filename
thanks. | c******r 发帖数: 38 | 2 You need output it to another file like:
sed -e 's,oldstr,newstr,' filename >filename1
【在 e****e 的大作中提到】 : when I use sed to replace a string in a file, it only shows on the screen that : string has been changed, but when I open that file, it is still the same as : before. : the command I used is: : sed -e 's,oldstr,newstr,' filename : thanks.
| t******q 发帖数: 117 | 3 sed -e 's/old/new/g'$nameold > $namenew
mv $namenew $namenew
【在 c******r 的大作中提到】 : You need output it to another file like: : sed -e 's,oldstr,newstr,' filename >filename1
|
|