root.sh 273 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. #############################################
  3. ## Root shell
  4. #############################################
  5. if [ "$#" -eq 1 ]; then
  6. ## No command, fall back to interactive shell
  7. exec bash
  8. else
  9. ## Exec root command
  10. shift
  11. exec "$@"
  12. fi