The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: grep problem
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-05-2001
xiamin xiamin is offline
Registered User
 

Join Date: Aug 2001
Posts: 58
grep problem

Hi

I would like to know wheather there is anyway to pass a variable to grep argument like this

grep "$myvar" $myfile

i would put this in a function and then call this function by setting different values to myvar and myfile.

is this possible at all.

regards
Hrishy
Forum Sponsor