The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 08-31-2008
Lakris Lakris is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 243
useless use of cat?

I guess I misinterpreted the OP, now here is my supersilly superuseless use of cat and pipe...

Code:
for x in *.txt;do cat $x|tr "\n" " "|egrep '(use.*take|take.*use)'&>/dev/null; [ $? == 1 ] && echo $x;done
but I think it gets the job done?

/Lakris