Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Last active August 29, 2015 14:23
Show Gist options
  • Save mattintosh4/49ffa8de3b7abbb78366 to your computer and use it in GitHub Desktop.
Save mattintosh4/49ffa8de3b7abbb78366 to your computer and use it in GitHub Desktop.
#!/bin/bash
bash --version
unset PATH
bash --version
GNU bash, version 4.3.39(1)-release (armv7l-unknown-linux-gnueabihf)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
./gistfile1.sh: line 6: bash: No such file or directory
$ type bash
bash is /bin/bash
$ type ls
ls is /bin/ls
$ type cat
cat is /bin/cat
$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
$ declare -p PATH
declare -x PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
$ tr : \\n <<<"$PATH" | nl
1 /usr/local/bin
2 /usr/local/sbin
3 /usr/bin
4 /usr/sbin
5 /bin
6 /sbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment