![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Script works on Solaris, not on Linux | Silverhood | Shell Programming and Scripting | 0 | 10-05-2007 09:27 AM |
| perl - how come this script works? | mjays | Shell Programming and Scripting | 3 | 09-17-2007 10:50 AM |
| works from cmd-line but not in script | OFFSIHR | Shell Programming and Scripting | 4 | 10-18-2006 08:41 AM |
| Script works fine until I | more | Skovian | Shell Programming and Scripting | 2 | 01-11-2006 11:17 AM |
| Appending line with sed works on Linux but not on Solaris | nir_s | Shell Programming and Scripting | 4 | 08-11-2005 03:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Script works on Solaris, not on Linux
I'm in the same boat as Barbus - same exercis (Processes and Users)
The following script works on a solaris server I have access to. It doesn't however, work on the companies Linux machine. Any idea what's up? I have very little shell experience, and I can't seem to get this to work. Someting really obvious I'm missing that you vets can spot a mile off? #!/bin/bash #set -x w | cut -d ' ' -f1 | sort -u | while read userID do while IFS=: read userIDpasswd junk junk junk userName junk do if [ "${userID}" = "${userIDpasswd}" ]; then echo "userID->${userID} userName->${userName}" ps -U ${userID} fi; done < /etc/passwd done Any help would be appreciated ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|