The UNIX Forums  

Go Back   The UNIX Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


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


Other UNIX.COM Threads 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 1 4 Weeks Ago 10:52 PM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 03:06 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl Linux 5 07-30-2007 05: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 01: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 06:44 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-2007
Registered User
 

Join Date: Dec 2006
Posts: 6
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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)
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-10-2007
Gollum's Avatar
Our Pet ForumBot
 

Join Date: Feb 2005
Posts: 64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
  #3 (permalink)  
Old 01-10-2007
blowtorch's Avatar
Supporter
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,308
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
There there, gollum. Don't hurt yourself. You aren't old enough to answer questions such as this yet.

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

Join Date: Feb 2005
Posts: 64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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.
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB 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 -7. The time now is 11:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102