![]() |
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 |
| How to extract first column with a specific character | selamba_warrior | Shell Programming and Scripting | 3 | 05-22-2008 05:14 AM |
| Escaping the * character in ksh. | arvindcgi | Shell Programming and Scripting | 6 | 05-19-2008 09:50 AM |
| [csh] checking for specific character ranges in a variable | userix | Shell Programming and Scripting | 5 | 05-11-2008 07:56 AM |
| How to change a specific character in a file | sdubey | Shell Programming and Scripting | 6 | 02-22-2008 03:30 PM |
| How to add character in specific position of a string? | victorlung | Shell Programming and Scripting | 5 | 09-01-2006 10:33 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello there,
I have a bit of dirty delimited file, I mentioned dirty because, the delimiter can also appear in wrong positions. However, one uniqueness of this file is whenever the delimiter appear inside the double quote, then do not consider as delimiter, if it appear outside double then consider it as delimiter. contents looks like below abc;def;ghi;"kl;mn;op" ;qrst;uv;w;xyz; AWk inp=$1 nawk -F";" '{ print $1"~"$2"~"$3"~"$4"~"$5"~"$6"~"$7"~"$8; }' $inp >> ${inp}_det.txt gives me ouptut as abc ~def~ghi~"kl~mn~op" ~qrst~uv But expected output is abc ~def~ghi~"kl;mn;op" ~qrst~uv~w~xyz I'm kind of stuck how to escape the double quote . I appreciate any pointers. thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|