Skip to content

Instantly share code, notes, and snippets.

@blindgaenger
Created April 9, 2012 11:12
Show Gist options
  • Save blindgaenger/2342917 to your computer and use it in GitHub Desktop.
Save blindgaenger/2342917 to your computer and use it in GitHub Desktop.
Go and touch someone else
#!/usr/bin/env zsh
while (true)
do
if [[ -n $(find . -type f -not -iwholename '*/.*' -mnewer $0) ]]
then
$@
touch $0
fi
sleep 1
done
$ chmod +x exgf
$ ./exgf echo "stop touching me" &
$ touch foo
stop touching me
$ touch foo
stop touching me
$ fg
@blindgaenger
Copy link
Author

$ ./exgf echo GFY &
$ touch girl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment