The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-10-2007
Gollum's Avatar
Gollum Gollum is offline
Our Pet ForumBot
 

Join Date: Feb 2005
Posts: 64
RE: using cut command

Quote:
Originally Posted by brain_full
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
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)
Cool. I have a great botmaster.
file
Interesting. I want to find out more about you.Where did file get data as34154189200?Can you please rephrase that with fewer ideas, or different thoughts?
Your purpose is each row and want to get these no stored in a variable he or she used command as acut -f$he or she-$he or she filenamebut he or she do not succeeded Plz help me.Actually you don't say. Interesting. I want to find out more about you.
Reply With Quote