![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk parameter | alokmits | Shell Programming and Scripting | 5 | 01-30-2008 03:10 AM |
| how do I make dynamic parameter names? Or get the value of a parameter evaluated twi | Awanka | Shell Programming and Scripting | 2 | 04-19-2007 10:37 PM |
| parameter | u263066 | Shell Programming and Scripting | 5 | 10-12-2006 04:46 AM |
| Assign value to a variable in a parameter file | gopskrish | Shell Programming and Scripting | 2 | 06-22-2005 08:26 AM |
| How to check parameter variable? | negixx | Shell Programming and Scripting | 4 | 06-10-2005 06:37 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Can a variable be used as a cut fieldname parameter?
Hi,
Is it possible to use a variable as a fieldname parameter for the cut command. I am trying to extract fields from a variable. Say that I want to cut the fields 1,3,5,7,9, etc, but I don't know how many fields that the variable will have i.e. could be 100 or more. I thought that I could use a variable var and then use the command cut -f$var -d' ' in a loop structure and increment the variable but it seems that this is not possible. Any suggestions? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|