![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. Shell Script Page. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 4 Weeks Ago 04:11 AM |
| Sunsolaris shell script runs only as super user | gjithin | SUN Solaris | 4 | 05-09-2008 05:47 AM |
| rsh as super user without password prompt | TheMightyUrrrrf | UNIX for Dummies Questions & Answers | 1 | 02-13-2008 06:50 AM |
| reassigning key functions in super user mode | lehcar511 | UNIX for Advanced & Expert Users | 5 | 06-19-2003 09:03 AM |
| FTP as Super User | fbavent | UNIX for Dummies Questions & Answers | 3 | 05-22-2002 08:49 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
|||
|
I'm guessing there is an alias awk=nawk. Solaris awk is, um, defective, so advanced features require nawk - the new awk. As superuser, try
Code:
type awk In general you do not want to run around the system doing things in privileged mode. It's to easy to do something horrendous |