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 -->
  #1 (permalink)  
Old 10-04-2008
thepurple thepurple is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 134
Find Strings in Files

experts,

i am using solaris 9. there are serveral *.log files in a directory "/var/alllogs/". Among the files one or several files contain the string "0198634873".

I want do-

cat *.log | grep "0198634873"; And want to see which Files(file_name) contain that string. Plus output will go to a file.

guys could you please help me how to write the script.

//purple