summaryrefslogtreecommitdiff
path: root/EXAM.md
diff options
context:
space:
mode:
Diffstat (limited to 'EXAM.md')
-rw-r--r--EXAM.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/EXAM.md b/EXAM.md
index f02f49a..bd7af87 100644
--- a/EXAM.md
+++ b/EXAM.md
@@ -139,6 +139,12 @@ Some examples of IPC mechanisms are:
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