|
using cut command
i have a file and i want to use cut command in my program.
file has data as
34
154
189
200
....
numbers in diff row and i want to access these numbers one by one by passing argument as interger (1 then 2 the 3 .....) for each row and want to get these no stored in a variable
I used command as
a=`cut -f$i-$i filename`
but i do not succeeded
Do i use sed instead of cut
Plz help me.
(Actually i want to access groupid from /etc/group and the make them uniq then i wanted the name of user associated with that groupid)
|