Portál AbcLinuxu, 16. listopadu 2025 01:30
man awk:
-v var=val
--assign var=val
Assign the value val, to the variable var, before
execution of the program begins. Such variable
values are available to the BEGIN block of an AWK
program.
awk -v USER=somalec '/$USER/ {print $2}' $LOG
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.