[CentOS] sed question
Gordon Messmer
gordon.messmer at gmail.comTue Aug 25 18:34:20 UTC 2015
- Previous message: [CentOS] sed question
- Next message: [CentOS] please block user
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 08/25/2015 11:21 AM, Alice Wonder wrote: > > cat file.txt |\ > sed -e s?"foo"?"bar"?g |\ > sed -e s?"dirty"?"clean?" |\ > > file2.txt I don't understand why you'd quote that way. Though unlikely, you could potentially match a filename in the working directory, and hose the sed command. For efficiency's sake, you can eliminate cat and one of the two sed processes, and still have a more readable command: sed -e 's?foo?bar?g' \ -e 's?dirty?clean?' \ < file.txt > file2.txt
- Previous message: [CentOS] sed question
- Next message: [CentOS] please block user
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list