Variables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Variables

Samba - linux mailing list
My shell's tutorial mentions two of these: HOME and PWD. How might I
list all such?

{
 > echo My home directory is $HOME
My home directory is /home/tutorial

Variable substitution also occurs in double quotes, but not single quotes:

 > echo "My current directory is $PWD"
}

http://fishshell.com/docs/current/tutorial.html
--
www.netspeed.com.au/bryan/

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: Variables

Samba - linux mailing list
On 11/09/17 01:14, Bryan Kilgallin (iiNet) via linux wrote:
> My shell's tutorial mentions two of these: HOME and PWD. How might I list all such?

$ set

But you may get a very long list, so try
$ set | less

[I do not know 'fish' so YMMV]

Eyal

> {
>  > echo My home directory is $HOME
> My home directory is /home/tutorial
>
> Variable substitution also occurs in double quotes, but not single quotes:
>
>  > echo "My current directory is $PWD"
> }
>
> http://fishshell.com/docs/current/tutorial.html

--
Eyal Lebedinsky ([hidden email])

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux