USER:
USER=....
.
- " ",
${ }. $1. ${1 ... }.$1 , NUL , ${1:- }.- $1 ( nul), .
$1 NUL , -.- } " ".- .
id -un. , man id.id -un . , .
$(id -un).
:
$ USER=${1:-$(id -un)}
USER , 1, , .
, :
$ tf(){ USER=${1:-$(id -un)}; echo "$USER"; }
If a value is specified, this value is returned:
$ tf bind
bind
If no username is specified, the name of the executable user is printed:
$ tf
bize
user2350426
source
share