![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics 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 | 06-04-2008 08:11 AM |
| Sunsolaris shell script runs only as super user | gjithin | SUN Solaris | 4 | 05-09-2008 09:47 AM |
| rsh as super user without password prompt | TheMightyUrrrrf | UNIX for Dummies Questions & Answers | 1 | 02-13-2008 10:50 AM |
| reassigning key functions in super user mode | lehcar511 | UNIX for Advanced & Expert Users | 5 | 06-19-2003 01:03 PM |
| FTP as Super User | fbavent | UNIX for Dummies Questions & Answers | 3 | 05-23-2002 12:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate 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 |
|
||||
|
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 |
|
||||
|
$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 |
![]() |
| Bookmarks |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|