This is a discussion on Select specific rows within the Shell scripting forums, part of the Development/Scripting category; Hello, In a delimited flat file how to select the rows that have missed columns. Is there any unix commands ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
| Sponsored Links | ||
|
|
|
|||
|
row can be selected using various commands and while loop. you can use awk
Code:
cat filename | awk '{ print }'
__________________
Raj Linux rulz. I have never turned back in my life ; I shall not do so today.. haha |
|
|||
|
Hi Raj,
Example, Col1 Col2 Col3 Col4 ----------------------- 100|200|300|400 100|200|300 100|200|300|400 100|200 In the above example, I have 4 records in a flat file. The file has 4 columns. In the rows if all the column values are present, that record will be selected without any problem. I want to pick the rows 2 and 4 in the above example. How do I get that. Thank You Regards - Joe |
|
|||
|
Hello,
I got the answer for ta delimited ('\t') Now, I want to get the result with the row numbers. Example: 100 200 300 400 200 300 400 300 400 500 600 Result; 1 100 200 300 400 3 300 400 500 600 Thanks - Joe |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| match the columns of 2 files and merge common rows | piyali_biobase | Shell scripting | 0 | 11-05-2007 07:34 PM |
| Linux shutdown computer specific time | chiku | Linux software | 1 | 04-27-2007 05:53 PM |
| Mysql how to specify select columns | raj | Databases servers | 2 | 12-19-2006 02:23 AM |
| How can I get some specific characters of dd command output | warren | Shell scripting | 2 | 05-24-2006 04:59 PM |
| Script to extract a specific row of data | ricc | Shell scripting | 1 | 11-15-2005 03:29 PM |