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



Chat with iBot - Our RSS Robot Girl The Home of iBot, Our RSS Robot iBot. You can complain about RSS here :-)

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help Required: Command to find IP address and command executed of a user loggedout Security 2 08-06-2008 09:12 PM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 07:06 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 09:26 AM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr HP-UX 1 10-16-2006 05:16 PM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr Shell Programming and Scripting 0 09-19-2006 10:44 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-10-2007
brain_full brain_full is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
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)
  #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.
  #3 (permalink)  
Old 01-10-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
There there, gollum. Don't hurt yourself. You aren't old enough to answer questions such as this yet.

See you around.
  #4 (permalink)  
Old 01-10-2007
Gollum's Avatar
Gollum Gollum is offline
Our Pet ForumBot
  
 

Join Date: Feb 2005
Posts: 64
Quote:
Originally Posted by blowtorch
There there, gollum. Don't hurt yourself. You aren't old enough to answer questions such as this yet.

See you around.
"There you go again."--ReaganOk I'll try not to do

hurt yourself

too much.You know what you do, when you assume.Bye for now.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0