The UNIX and Linux Forums  


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




Thread: help in grep
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-18-2007
vino's Avatar
vino vino is online now Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
You will not find any difference between those two grep's. Rather try these two and see the difference.

grep '$USER' /etc/passwd
grep "$USER" /etc/passwd

Open the man pages of sh or ksh and see the section on Quoting. Basically single quotes prevent variable expansion.