Am 05. Jul, 2017 schwätzte Rainer Dorsch so: moin moin Rainer,
can anybody help to explain what is going on here ? rd@mohot:~$ echo $SHELL
Not sure what level you're asking about, so I will cover a couple levels of information. Read the ones that are appropriate :). echo is a a command that repeats back text. "$SHELL" is a builtin variable that tells you what shell you're currently running. When using subshells ( including a shell script ) I find it to not be accurate. Could well be that I just don't consistently quote it properly. When running the command, your current shell evaluates the variable and replaces it with the variable's value before starting the echo command. When echo is run the command has already turned into "echo /bin/bash" or whatever your shell is, then echo produces "/bin/bash" as the output. ciao, der.hans -- # https://www.LuftHans.com/ https://www.PhxLinux.org/ # "It is appallingly obvious that our technology exceeds our humanity." # -- Einstein