O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tilde Substitution

After alias substitution is performed, each word is checked to see if it begins with an unquoted . For tilde substitution, word also refers to the word portion of parameter expansion (see Parameter Expansion below). If it does, then the word up to a / is checked to see if it matches a user name in the password database (often the /etc/passwd file). If a match is found, the and the matched login name are replaced by the login directory of the matched user. If no match is found, the original text is left unchanged. A by itself, or in front of a /, is replaced by $HOME. A followed by a + or - is replaced by the value of $PWD and $OLDPWD respectively.

In addition, when expanding a variable assignment, tilde substitution ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required