![]() |
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 |
| Adding a new field using sed or awk? | sasabune | UNIX for Dummies Questions & Answers | 3 | 06-01-2007 09:57 PM |
| remove space in front or end of each field | happyv | Shell Programming and Scripting | 6 | 03-22-2007 02:05 AM |
| Adding field of flatfile by an index. | djsal | Shell Programming and Scripting | 2 | 02-14-2007 12:53 PM |
| field delimiter with a space or more | uphamtn | UNIX for Dummies Questions & Answers | 3 | 05-15-2003 05:22 PM |
| How do you represent a field delimeter that is a space??? | TRUEST | UNIX for Dummies Questions & Answers | 1 | 05-04-2003 10:01 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Awk adding a space between integer and the rest of the field
Hi,
I have a problem where some of the records I need to process have the first address field as something like "10Walpole Street" where obviously I want it to be "10 Walpole Street". I know I need to somehow separate out the integer and probably form a new string variable, but I just don't know how to do it. There are other instances where there may be a ";" stuck in there instead of a space too, futher into the address or in the next address field, etc. Thinking about this latter case, I should be able to add ";" to the field separator list. ![]() I'm still left with some other badly formed addresses that sometimes contain no space in the middle where there probably should be a field separator or space, for example "scotlanwellgreen,stirling", I don't know if I could hope to catch all such occurances, and I don't even know for sure that such place names are supposed to have spaces! Looking up "scotlanwell green" on google suggests that I might try "Scotlandwell green", which turns out to be a real place - it's just another badly typed or formed address that I probably have no hope of catching and correcting in a script. The occurances are seemingly random. Any help with these would be much appreciated! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|