[PLUG] File content modification

Mayuresh mayuresh at acm.org
Mon Aug 2 19:16:03 PDT 2010


On Mon, Aug 02, 2010 at 11:08:44AM +0530, Nandan Marathe wrote:
> On Sun, Aug 1, 2010 at 2:40 PM, Mayuresh <mayuresh at acm.org> wrote:
> >
> the cat is unnecessary. Otherwise this looks the cleanest solution.
> cut -d_ -f2- temp | sed -e 's/_county//' -e 's/_//g'
> - Nandan

cat is not put out of "necessity". It's more a style matter. If you use
cat at the source end of filter, modifying the filter chain becomes
easier. (E.g. imagine having to shuffle filter sequence for efficiency.
If you write 1 filter per line, it's mere a matter of dd and p in vi if
you have pulled out cat file name at the source end.)

Mayuresh.



More information about the plug-mail mailing list