Hi..
im a newbie in shell scripting, and also new in this forum..
i understand the command below is just reading from /etc/passwd
and getting whatever in field 1 and 3 (which are username and userID)
after the cut the format will be
username:uid
my guess,its making the array with the index in respect to its userID
but i dont understand the expression
{i#*:}]=${i%: *}
could somebody please explain how to read those...
and what those will evaluate to...
and how to work with things like those(i dont think those're regex-i have no clue)..
=========================================================
for i in $(cut -f 1,3 -d: /etc/passwd) ; do array[${i#*:}]=${i%: *}done