1 2 3 4 5 6 7 8 9 10 11 12 |
#!/bin/ksh PASSWORD_FILE="/etc/passwd" ls –l $PASSWORD_FILE > /dev/null 2>&1 if [[ $? != 0 ]]; then print “$PASSWORD_FILE was not found" exit else for username in $(cat $PASSWORD_FILE | cut -f1 -d:) do print $username done fi |