View Single Post
  #1 (permalink)  
Old 05-09-2008
gjithin gjithin is offline
Registered User
 

Join Date: May 2008
Posts: 16
Script using awk works only as super user

hi friends,

I am a new Sun Solaris 10 user. I have the following script

line=$(awk '{if(substr($0,1,1)!="#" &&
substr($0,1,1)!=";" &&
substr($0,1,1)!=" " &&
substr($0,1,1)!="/" &&
substr($0,1,1)!="*" &&
substr($0,1,1)!="\\" &&
length($0)!=0)
{print $0}
}' filename

This works fine when i login as super user but it does not work with other user and show error.

Do i need to change any enviornment variables please help

Thanks
Jithin.G
Reply With Quote
Forum Sponsor