Читать книгу Linux Bible - Christopher Negus - Страница 109
Expanding variables
ОглавлениеVariables that store information within the shell can be expanded using the dollar sign ($
) metacharacter. When you expand an environment variable on a command line, the value of the variable is printed instead of the variable name itself, as follows:
$ ls -l $BASH -rwxr-xr-x. 1 root root 1219248 Oct 12 17:59 /usr/bin/bash
Using $BASH
as an argument to ls -l
causes a long listing of the bash command to be printed.