![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compare selected columns from a file and print difference | kingpeejay | Shell Programming and Scripting | 4 | 07-20-2009 02:01 AM |
| perl script to print to values in rows and columns | nogu0001 | Shell Programming and Scripting | 3 | 02-22-2009 04:30 PM |
| Script to place selected columns from a group of files side by side in a new file | ks_reddy | Shell Programming and Scripting | 8 | 02-12-2009 12:09 PM |
| AWK script to print all the columns excpet the one specified | kn.naresh | Shell Programming and Scripting | 3 | 05-22-2008 08:34 AM |
| selected columns exctract | ashokkumar83 | UNIX for Dummies Questions & Answers | 2 | 12-12-2007 09:05 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
shell script(Preferably awk or sed) to print selected number of columns from each row
Hi Experts,
The question may look very silly by seeing the title, but please have a look at it clearly. I have a text file where the first 5 columns in each row were supposed to be attributes of a sample(like sample name, number, status etc) and the next 25 columns are parameters on which I am interested in looking at. But the problem is for some of the rows in the text file we don't have all the 5 columns(first 5 fields). Then the parameter column will be left offset by 1 or 2 columns etc depending on the number of missing attribute columns. So I decided to print the last 25 columns starting from the last column so that for each sample I get my required parameters from which I need make some plots. I need the script preferable using awk, sed and grep. Many thanks friends.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|