Skip to content

Instantly share code, notes, and snippets.

@fcicq
Created August 1, 2019 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcicq/296c5a0a0ae0f274277d48408bb690cc to your computer and use it in GitHub Desktop.
Save fcicq/296c5a0a0ae0f274277d48408bb690cc to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -lt 2 ]; then
echo usage $0 path exe [args]
exit 1
fi
p=$1
f=$p/run
shift
echo mkdir -p $p
echo echo \#!/bin/sh \> $f
echo echo exec 2\>\&1 \>\> $f
echo echo exec $@ \>\> $f
echo chmod +x $f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment