The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 03-16-2006
gauravgoel gauravgoel is offline
Registered User
  
 

Join Date: Dec 2005
Location: India
Posts: 218
how to print single quote in awk

Hi all,

It is a very stupid problem but I am not able to find a solution to it.

I am using awk to get a column from a file and I want to get the output field in between single quotes. For example,

Input.txt

123 abc
321 ddff
433 dfg
........

I want output file to be as
output.txt

value is 'abc'
value is 'ddff'
value is 'dfg'
...............

the problem is how to get these single quotes in output, at this moment I am first taking *abc* and then replacing * with ' (single quote).
How can we do this with awk

thanks
Gaurav