![]() |
|
|||||||
| Home | Forums | Register | Rules & FAQ | Donate | Members List | 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. |
![]() |
|
|
Submit Tools | 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 |
| Forum Sponsor |
|
|
|
|||
|
$PATH in super user has another component /usr/sbin
But which awk in both super user and user gives /usr/bin I tried to change $PATH in *.profile file of user .it changes in file . But then again i checked the echo $PATH it shows the same earlier result. The env command also shows earlier $PATH |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sunsolaris shell script runs only as super user | gjithin | SUN Solaris | 4 | 1 Week Ago 07:47 AM |
| Traffic Control Super Script 5.1.63 (Default branch) | iBot | Software Releases - RSS News | 0 | 03-03-2008 03:10 PM |
| rsh as super user without password prompt | TheMightyUrrrrf | UNIX for Dummies Questions & Answers | 1 | 02-13-2008 08:50 AM |
| reassigning key functions in super user mode | lehcar511 | UNIX for Advanced & Expert Users | 5 | 06-19-2003 11:03 AM |
| FTP as Super User | fbavent | UNIX for Dummies Questions & Answers | 3 | 05-22-2002 10:49 PM |