[CentOS] OT: Script Help

Les Mikesell lesmikesell at gmail.com
Thu May 30 16:30:19 UTC 2013


On Thu, May 30, 2013 at 10:52 AM, Larry Martell <larry.martell at gmail.com> wrote:
>
>>>>>> cat file | sed -e's/CN=DATA.OU=\(.*\)\.O=CO/CN=\1_DATA.OU=\1.O=CO/'
>>>>>
>>>>> Because a cat is a terrible thing to waste.
>>>>>
>>
>> So why cat | sed?
>
> I really don't see why that is a big deal.

It goes back to the days of expensive computing resources when every
process mattered (the days of wooden computers and iron
programmers...).

Sed or the invoking shell can open files just as easily as cat, so
there's no need to set up a pipeline to get a stream of data from a
file. Cat isn't adding anything and just takes extra time to load.

--
   Les Mikesell
     lesmikesell at gmail.com



More information about the CentOS mailing list