Specific result of awk script
Hi all
I'm using the following awk command to find out the users home directory from /etc/passwd file.
#grep jeesun /etc/passwd |awk 'BEGIN {FS=":"};{print $6}'
But problem is when there are two name like "jeesun" and "jeesunadm" exist the script shows both result not specific one.
#grep jeesun /etc/passwd |awk 'BEGIN {FS=":"};{print $6}'
/home/jeesun
/home/jeesunadm
But I need the exact name and its home directory.
|