Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #183241

Re: Bash Question

From "der.hans" <deb-user@LuftHans.com>
Newsgroups linux.debian.user
Subject Re: Bash Question
Date 2017-07-06 00:10 +0200
Message-ID <u00EF-3NZ-5@gated-at.bofh.it> (permalink)
References <u00lk-3rk-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bash Question Rainer Dorsch <ml@bokomoko.de> - 2017-07-05 23:50 +0200
  Re: Bash Question Sven Joachim <svenjoac@gmx.de> - 2017-07-06 00:10 +0200
  Re: Bash Question Jonathan Marquardt <parckwart@parckwart.de> - 2017-07-06 00:10 +0200
    Re: Bash Question "der.hans" <deb-user@LuftHans.com> - 2017-07-06 00:40 +0200
      Re: Bash Question Jonathan Marquardt <parckwart@parckwart.de> - 2017-07-06 00:50 +0200
  Re: Bash Question "der.hans" <deb-user@LuftHans.com> - 2017-07-06 00:10 +0200
    Re: Bash Question David <bouncingcats@gmail.com> - 2017-07-06 09:30 +0200
      Re: Bash Question Greg Wooledge <wooledg@eeg.ccf.org> - 2017-07-06 14:00 +0200
  Re: Bash Question Javier Barroso <javibarroso@gmail.com> - 2017-07-06 00:30 +0200
    Re: Bash Question Darac Marjal <mailinglist@darac.org.uk> - 2017-07-06 11:00 +0200
      Re: Bash Question <tomas@tuxteam.de> - 2017-07-06 12:00 +0200
        Re: Bash Question Rainer Dorsch <ml@bokomoko.de> - 2017-07-06 13:50 +0200
  Re: Bash Question Phil Wyett <philwyett@kathenas.org> - 2017-07-06 00:40 +0200

csiph-web