1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh if [ -z "$1" ] then printf 'usage: %s [OPTIONS] NEWROOT [COMMAND [ARG]...]\n' "$0" >&2 exit 1 fi umask 022 exec sudo chroot "$@"