On Mi, 18 dec 19, 21:42:21, rhkramer@gmail.com wrote:
> On Wednesday, December 18, 2019 12:26:04 PM tomas@tuxteam.de wrote:
>
> > #!/bin/bash
> > home=${HOME:-~}
>
> What does that line do, or more specifically, what does the :-~ do -- note the
> following:
It will set the variable 'home' to the value of the variable 'HOME' if
set (yes, case matters), otherwise to '~'.
See the bash manpage, section 'Parameter Expansion'.
Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
Attachment:
signature.asc
Description: PGP signature