bash set
hi all,
I've read that the set command can be used to list environment variables in bash. However, when I type set I get what looks like code from some kind of shell script: ... return $?; else return 127; fi; fi } dequote () { eval echo "$1" 2> /dev/null } quote () { echo \'${1//\'/\'\\\'\'}\' } quote_readline () { if [ -n "$bash4" ]; then echo "${1}"; return; fi; local t="${1//\\/\\\\}"; echo \'${t//\'/\'\\\'\'}\' } Any idea why this would not list the environment variables? I am running Ubuntu 10.04. |
Perhaps `set` is aliased to something else?
try the `alias` command in your shell and see.. Meanwhile, you could use the `env` command to see environment variables. NOTE: These are general ideas - if Ubuntu does something strange that I don't know about, well.. I don't know about it :) |
Normal behaviour. "set" prints all shell variables, including functions (with their implementation details). Try set | less and you will see that it does contain what your were looking for.
If you need something more specific , try: echo $BASHOPTS echo $SHELLOPTS set +o set -o shopt -s shopt -u declare -r declare -a declare -f declare -i declare -x |
echo $SET ?
|
All times are GMT -5. The time now is 05:47 AM. |