[PLUG] File content modification

Nandan Marathe nrmarathe at gmail.com
Tue Aug 3 08:54:24 IST 2010


On Tue, Aug 3, 2010 at 7:46 AM, Mayuresh <mayuresh at acm.org> wrote:

> 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.)
>
agreed that it helps out in more complicated solutions (sometimes i prefer
the sponge <http://packages.debian.org/lenny/moreutils> ) for
multi-manipulations with the pipe, but this case is too simple for the style
factor :)

>
> Mayuresh.
>
> _______________________________________
> Pune GNU/Linux Users Group Mailing List
>



More information about the Plug-mail mailing list