Bash Script String Splitting
Hi.
I am trying to write a bash script that reads usefull information from the /etc/passwd file
at the moment I've got
for user in $( cat /etc/passwd )
do
...
done
inside the loop I would like to split $user = "username:uid:etc:etc" into $username, $uid., $gid, $etc...
Any suggestions?
Many Thanks
Murray
|