![]() |
Hello and Welcome from 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 |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| Print Problem in UNIX. Need to know the option to specify the print paper size | ukarthik | HP-UX | 1 | 06-07-2007 10:35 AM |
| how to print part of report ? | Golive | HP-UX | 2 | 06-22-2005 11:29 AM |
| How to "Print Screen" from a dumb terminal on AIX? | stembe | UNIX for Advanced & Expert Users | 3 | 11-15-2002 12:01 PM |
| Print The ouput From ls | grep "!!!" | geoquest | UNIX for Advanced & Expert Users | 5 | 04-11-2002 06:45 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How do I get awk to print a " in it's print part?
The line is simple, use "[" as a field separator for the bits. What I need to do is put a " between $2 and $3.
I can't seem to figure out the escape character needed to get awk to actually print out the " and not think it's part of a bigger double ". Any ideas? awk -F[ '{ print $1"["$2$3 }' file.txt| awk -F] '{ print $1"]"$2"\"$3THE " NEEDS TO GO HERE$4 }' I've tried \", "\, ^" and '"" but none of it works. What am I missing? Putting in the [ between $1 and $2 works fine, I just need to do the same with a ". Thanks. |
|
||||
|
I'm not sure this is exactly what you wanted.
cat file | awk -F: '{print $1, $2, "\"", $3}' sybqad0l 1706 " 546 sybbev0x 6218 " 542 wpati0k 8145 " 253 wembi02 4621 " 267 pimdp01 223 " 133 abainn1 7098 " 1141 abaibm1 7094 " 1141 -X |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|