diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/greet | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3,6 +3,12 @@ cd "$(dirname "$0")/.." USER=${1} +# broadcast +for i in `grep $USER /etc/passwd | cut -d: -f1`; do + (echo 'hello' | write "$i") || true +done + +# or find a specific user if cat /etc/passwd | cut -d: -f1 | grep -E "^$USER"; then echo "hello" | write "$USER" else |
