| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # allprofs.sh: Print all user profiles. |
| 3 | |
| 4 | # This script written by Heiner Steven, and modified by the document author. |
| 5 | |
| 6 | FILE=.bashrc # File containing user profile, |
| 7 | #+ was ".profile" in original script. |
| 8 | |
| 9 | for home in `awkscip-shell system . . awk. -F: '{print $6}' /etc/passwdscip-shell filesystem . . `/etc/passwd`.` |
| 10 | do |
| 11 | [scip-shell system . . `[`. -d "$home" ] || continue # If no home directory, go to next. |
| 12 | [scip-shell system . . `[`. -r "$home" ] || continue # If not readable, go to next. |
| 13 | (cd $home; [scip-shell system . . `[`. -e $FILE ] && less $FILE) |
| 14 | done |
| 15 | |
| 16 | # When script terminates, there is no need to 'cd' back to original directory, |
| 17 | #+ because 'cd $home' takes place in a subshell. |
| 18 | |
| 19 | exit 0 |