Tilde (~) Token
Less than 1 minute
~
) Token
Tilde (Home directory path variable
Description
The tilde token is used as a lazy reference to the users home directory.
Examples
» out: ~
/home/bob
» out: ~joe
/home/joe
Detail
Tilde can be expanded inside double quotes, brace quotes as well as used naked. But it cannot be expanded inside single quotes.
» out: ~
/home/bob
» out: '~'
~
» out: "~"
/home/bob
» out: %(~)
/home/bob
See Also
- Array (
@
) Token: Expand values as an array - Brace Quote (
%(
,)
) Tokens: Initiates or terminates a string (variables expanded) - Double Quote (
"
) Token: Initiates or terminates a string (variables expanded) - Single Quote (
'
) Token: Initiates or terminates a string (variables not expanded) - String (
$
) Token: Expand values as a string (
(brace quote): Write a string to the STDOUT without new lineja
(mkarray): A sophisticated yet simply way to build a JSON arrayout
: Print a string to the STDOUT with a trailing new line characterset
: Define a local variable and set it's value