awk -F : -v user=”$u” ‘{if ($1==user) print $6}’ /etc/passwd
参考:http://www.gnu.org/…/Using-Shell-Variables.html
wolfg's journey with open source, linux, programming, sysadm …
awk -F : -v user=”$u” ‘{if ($1==user) print $6}’ /etc/passwd
参考:http://www.gnu.org/…/Using-Shell-Variables.html
0 Responses to “把shell变量传给awk”