I agree that sed is cumbersome for large tasks, but this is a very small task. And the sed solution does seem to be quite a bit more concise than the others.
|
Quote:
Sure, but think if you have to add more patterns like this ... Quote:
|
Quote:
Tried this but it pops a new line in there. How do I correct this? Here is output:- Code:
Patient No, Balance, Payor ID |
Hm, is this MS Windows?
Try changng the FS: from: Code:
-F', *' Code:
-F', ' |
This whole exercise looks a lot like homework to me...
|
Quote:
|
Quote:
I needed to manipulate some data extracts from legacy systems as we can't afford to do a data cleanse. |
Quote:
I have since loaded it into OpenOffice and exported again and the routine above works. Thank you. |
Quote:
|
I agree and I must confess that usually I have the same approach (quick and dirty, but efficient).
|
I like to work with fields instead of regexp, especially for structured data.
Code:
awk 'BEGIN{OFS=FS=", " |
Quote:
Code:
s/, N\([A-Z]\+\)/\0, 01\101/ |
All times are GMT -5. The time now is 10:18 AM. |