![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| weird behavior of grep -P | pankai | Shell Programming and Scripting | 2 | 12-20-2007 02:38 PM |
| New Style | Ralf | Post Here to Contact Site Administrators and Moderators | 1 | 06-17-2003 12:50 PM |
| Style not working right | criglerj | Post Here to Contact Site Administrators and Moderators | 3 | 11-25-2002 01:35 PM |
| oops! Style Manager | kristy | UNIX for Dummies Questions & Answers | 1 | 12-14-2001 03:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
|||
|
|||
|
the best....
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Quote:
awk: bailing out near line 1 |
|
#10
|
|||
|
|||
|
bump need help
|
|
#11
|
|||
|
|||
|
Don't bump your question, forum rules
Code:
Vsl Voy Port Sz Cat Wt Block Slot Row Qty Crane OperCode ResvFor carrier name 6113A xxxx 40 GP M U02 25 8 1 0 *some space* xxxx 40 HC M U02 25 8 1 0 *some space* xxxx 40 HC H U02 25 7 3 0 |
|
#12
|
|||
|
|||
|
i can't do more than one spacing, but there are five spacing between the first word and the 0th position
|
|
#13
|
|||
|
|||
|
Try this:
Code:
awk '/xxxx/{p="xxxx";print substr($0,index($0,p),length($0)+1-index($0,p))}' data.file
Last edited by danmero; 05-19-2008 at 09:31 PM. Reason: make life complicated |