Skip to content

Instantly share code, notes, and snippets.

/su

Created November 15, 2017 01:04
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 anonymous/7562cb8a54f711b27a939923732180db to your computer and use it in GitHub Desktop.
Save anonymous/7562cb8a54f711b27a939923732180db to your computer and use it in GitHub Desktop.
#!/bin/sh
if test $# -eq 0
then
echo 'su was not passed arguments, doing `su -` instead ...' >/dev/tty
exec /bin/su -
else
echo 'su was passed arguments, not doing `su -` instead ...' >/dev/tty
exec /bin/su "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment