The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-27-2006
LordJezo
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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.