On 05/01/2011 22:15, RW wrote:
> Personally I find that using cat makes things simpler and less error
> prone when reusing pipelines in shell history.
>
> For example it's easier to edit
>
> cat file | foo
>
> into
>
> cat file | bar | foo
> or cat file? | foo
>
> than editin
On Wed, 5 Jan 2011 15:13:02 -0700
Chad Perrin wrote:
> In this case, example was:
>
> cat file | foo arg
>
> . . . where it could have been:
>
> foo arg file
>
> That's just kind of absurd. I mean, that sort of usage (foo arg
> file) is exactly the purpose for which grep was designe
On Wed, Jan 05, 2011 at 10:15:38PM +, RW wrote:
>
> For example it's easier to edit
>
> cat file | foo
>
> into
>
> cat file | bar | foo
> or cat file? | foo
>
> than editing
>
> foo < file
>
> into
>
> bar < file | foo
> or cat file? | foo
In this case, e
On Wed, 5 Jan 2011 08:05:14 -0800
Chip Camden wrote:
> Quoth Chad Perrin on Tuesday, 04 January 2011:
> > The weirdest thing about most useless uses of cat is that not using
> > cat would actually be a little clearer and involve fewer keystrokes
> > -- as in this case.
> >
> I blame OOP. Prog
On Thu, Jan 06, 2011 at 12:07:13AM +1100, Ian Smith wrote:
>
> Do you know of any 'less useless' or more economical way to do such as:
>
> % cat /boot/boot1 /boot/boot2 | diff - /boot/boot
> %
Actually, that looks like a useful use of cat, whose original purpose it
is to concatenate the conten
Quoth Ian Smith on Thursday, 06 January 2011:
> In freebsd-questions Digest, Vol 344, Issue 4, Message: 14
> On Tue, 4 Jan 2011 23:24:01 -0700 Chad Perrin wrote:
> > On Tue, Jan 04, 2011 at 09:33:03AM -0800, Randal L. Schwartz wrote:
> > > > "Patrick" == Patrick Bihan-Faou
> writes:
> > >
Quoth Chad Perrin on Tuesday, 04 January 2011:
> On Tue, Jan 04, 2011 at 09:33:03AM -0800, Randal L. Schwartz wrote:
> > > "Patrick" == Patrick Bihan-Faou
> > > writes:
> >
> > Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
> >
> > And yet, you still have the "Useless Use of Cat".
>
In freebsd-questions Digest, Vol 344, Issue 4, Message: 14
On Tue, 4 Jan 2011 23:24:01 -0700 Chad Perrin wrote:
> On Tue, Jan 04, 2011 at 09:33:03AM -0800, Randal L. Schwartz wrote:
> > > "Patrick" == Patrick Bihan-Faou
> > > writes:
> >
> > Patrick> cat asdf.txt | grep -v XYZ | gr
On Tue, Jan 04, 2011 at 09:33:03AM -0800, Randal L. Schwartz wrote:
> > "Patrick" == Patrick Bihan-Faou writes:
>
> Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
>
> And yet, you still have the "Useless Use of Cat".
The weirdest thing about most useless uses of cat is that not using cat
> "RW" == RW writes:
RW> It's odd that people seem to be taking bla-bla so literally, when it's
RW> clearly a place holder for arbitary text.
That's the problem when you provide an example instead of a rule. But
oddly enough, once you figure out the actual rule, translating that into
a pr
On Tue, 2011-01-04 at 22:12 +, RW wrote:
> On Tue, 4 Jan 2011 10:01:47 -0800
> Devin Teske wrote:
>
> >
> > On Jan 4, 2011, at 9:33 AM, Randal L. Schwartz wrote:
> >
> > >> "Patrick" == Patrick Bihan-Faou
> > >> writes:
> > >
> > > Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
On Tue, 4 Jan 2011 10:01:47 -0800
Devin Teske wrote:
>
> On Jan 4, 2011, at 9:33 AM, Randal L. Schwartz wrote:
>
> >> "Patrick" == Patrick Bihan-Faou
> >> writes:
> >
> > Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
> >
> > And yet, you still have the "Useless Use of Cat".
>
>
On Jan 4, 2011, at 9:33 AM, Randal L. Schwartz wrote:
>> "Patrick" == Patrick Bihan-Faou writes:
>
> Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
>
> And yet, you still have the "Useless Use of Cat".
I know I'm joining the party late, but... what about:
grep -Ev '(XYZ|bla)' asdf.txt
> "Patrick" == Patrick Bihan-Faou writes:
Patrick> cat asdf.txt | grep -v XYZ | grep -v bla
And yet, you still have the "Useless Use of Cat".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, T
Le 04/01/2011 14:06, krad a écrit :
On 4 January 2011 10:32, S Mathias wrote:
cat asdf.txt
bla-bla
bla-bla
bla[XYZ]
importantthing
another important thing
[/XYZ]
bla-bla
bla-bla
[XYZ]
yet another thing
hello!
[/XYZ]
bla-bla
etc.
$ SOMEPERLMAGIC asdf.txt> output.txt
$ cat output.txt
importantt
On Tuesday 04 January 2011 12:32:00 S Mathias wrote:
> cat asdf.txt
> bla-bla
> bla-bla
> bla[XYZ]
> importantthing
> another important thing
> [/XYZ]
> bla-bla
> bla-bla
> [XYZ]
> yet another thing
> hello!
> [/XYZ]
> bla-bla
> etc.
> $ SOMEPERLMAGIC asdf.txt > output.txt
> $ cat output.txt
> impo
On 4 January 2011 10:32, S Mathias wrote:
> cat asdf.txt
> bla-bla
> bla-bla
> bla[XYZ]
> importantthing
> another important thing
> [/XYZ]
> bla-bla
> bla-bla
> [XYZ]
> yet another thing
> hello!
> [/XYZ]
> bla-bla
> etc.
> $ SOMEPERLMAGIC asdf.txt > output.txt
> $ cat output.txt
> importantthin
You know St. Peter won't call my name, freebsd-questions!
2011/01/04 02:32:00 -0800 S Mathias => To
freebsd-questions@freebsd.org :
$ perl -Mstrict -nwe 'print unless m/bla|XYZ/;' < asdf.txt
73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB 12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.org
__
18 matches
Mail list logo