Portál AbcLinuxu, 12. května 2025 11:01
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.