Last active
August 29, 2015 14:23
-
-
Save mattintosh4/49ffa8de3b7abbb78366 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bash --version | |
unset PATH | |
bash --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ type bash | |
bash is /bin/bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ type ls | |
ls is /bin/ls | |
$ type cat | |
cat is /bin/cat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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