💾 Archived View for thrig.me › blog › 2023 › 11 › 11 › atdirtest.sh captured on 2023-11-14 at 07:50:27.

View Raw

More Information

-=-=-=-=-=-=-

#!/bin/sh
set -e
d=`mktemp -d`
cd "$d"
f=`mktemp`
printf '(pwd;ls;cd /tmp;pwd;ls) | tee "%s"' "$f" |
at +1m
rmdir "$d"		# whoops!
#chmod 000 "$d"	# whoops?
sleep 61
printf '%s\n' "$f"