Want to use sed(1) to edit a file in place? Well, to replace every 'e' with an 'o', in a file name 'foo', you can do:
sed -i.bak s/e/o/g foo
And you'll get a backup of the original in a file name 'foo.bak', but if you want no backup:
sed -i '' s/e/o/g foo
1 則留言:
http://www.mgt.ncu.edu.tw/~dino/script/
張貼留言