![]() |
|
|
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 |
| awk program to select a portion of a line | anju | Shell Programming and Scripting | 3 | 01-11-2008 06:33 AM |
| How to select line by line in shell | preethgideon | UNIX for Dummies Questions & Answers | 15 | 10-12-2006 05:35 PM |
| Select matches between line number and end of file? | Jerrad | Shell Programming and Scripting | 4 | 05-24-2006 08:50 AM |
| awk to select a column from particular line number | mab_arif16 | Shell Programming and Scripting | 4 | 05-08-2006 06:26 AM |
| Filed substitution with awk | tony3101 | Shell Programming and Scripting | 1 | 09-14-2004 04:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to Select or cut from the certain filed to the end of the line
Hi:
I have few rows in file..Like suppose... 9063C0 44 00051363603253033253347 3333 070248 06 9063C0 5G PAN00013 9063C0 44 00061030305040404250724 0506 100248 08 9063C0 43 01 00000089 I need to cut the row starting after "9063C0" till the end of the line and store in another file... My o/P is: 44 00051363603253033253347 3333 070248 06 5G PAN00013 44 00061030305040404250724 0506 100248 08 43 01 00000089 |
|
||||
|
Hi Rajesh,
Use grep and sed combinations to do the need. grep ^9063C0 test | sed 's/^9063C0//' where test is the file name. OUTPUT : =========== $> grep ^9063C0 test 9063C0 44 00051363603253033253347 3333 070248 06 9063C0 5G PAN00013 9063C0 44 00061030305040404250724 0506 100248 08 9063C0 43 01 00000089 $> grep ^9063C0 test | sed 's/^9063C0//' 44 00051363603253033253347 3333 070248 06 5G PAN00013 44 00061030305040404250724 0506 100248 08 43 01 00000089 Hope this is what u wanted...... Last edited by helper; 04-10-2008 at 07:20 AM.. |
|
||||
|
Hi Rajesh,
Use grep and sed combinations to do the need. grep "9063C0" test | sed 's/9063C0//' where test is the file name. OUTPUT : =========== $> grep ^9063C0 test 9063C0 44 00051363603253033253347 3333 070248 06 9063C0 5G PAN00013 9063C0 44 00061030305040404250724 0506 100248 08 9063C0 43 01 00000089 $> grep ^9063C0 test | sed 's/9063C0//' 44 00051363603253033253347 3333 070248 06 5G PAN00013 44 00061030305040404250724 0506 100248 08 43 01 00000089 Hope this is what u wanted...... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|