Re: Scripting question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, Jul 12th 2003 at 13:34 +0100, quoth Alan Peery:

=>Leonard Miller wrote:
=>
=>>I have another file with blank lines - no space or tabs, just
=>>carriage returns. 
=>>Can I use that same line to remove those blank lines?
=>>  
=>>
=>Use
=>
=>cat file | grep -v  ^\$
=>
=>This will keep only those lines NOT matching "^\$", a line where there 
=>is nothing between the logical beginning and end of the line.  If you 
=>want to find lines that only have the letter q on them,
=>
=>cat fred | grep ^q\$
=>
=>would do the trick.
=>
=>Alan

I'm just curious. This is some sort of psychiatric deficiency or 
something. Why do *so* many people insist on 

cat fn | whatever 

when you can just say whatever < fn

After all, either 1 + 1 = 2

or else

Sigma{1..infinity}( 1/n ) + Sigma{1..infinity}( 1/n ) = 2


-- 
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by zero. Listen to me! We are all-
-individuals! What if this weren't a hypothetical question?
steveo at syslang.net


-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux