[CentOS] sed question
Alice Wonder
alice at domblogger.net
Tue Aug 25 18:21:37 UTC 2015
On 08/25/2015 11:02 AM, Gordon Messmer wrote:
>
> Additionally, you can avoid using "cat" to make the script more
> efficient. You'll start fewer processes, and complete more quickly. cat
> is almost never needed unless you actually need to con"cat"enate
> multiple files.
I sometimes like to use cat purely for stylistic reasons :
cat file.txt |\
sed -e s?"foo"?"bar"?g |\
sed -e s?"dirty"?"clean?" |\
> file2.txt
It lets me line up my sed expressions.
But yes, that is wasting a process for easier visualization. Worth it to me.
More information about the CentOS
mailing list