Hi,
The command -
id | awk '{print $1}'
- returns the following:
uid=9028(luke)
What do I need to further that awk so that I only have "
luke
", I want to set this as a variable.
Thanks in advance,
Lukas.
P.S: I've come up with:
USER1=`id | awk F'(' '{print $2}' | awk -F')' '{print $1}'`
This returns, "luke" but is there a better way of getting the same result?