I'm just (finally) making my first forays into bash scripting, and the first project i've set myself is essentially a finger clone.
But I'm having trouble with this line:
Code:
uid=$(gawk -F: '{ print $3 }' "$passwd" )
I've no idea how to get gawk to operate on the variable (which is a line grepped out of /etc/passwd). I've tried a few combinations of quote marks, but none want to work.
I've googled a few things, but not found anything useful.
The only way I can get it to work is to write the grep output to an external file, and then get gawk to operate on it.