![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Double quotes or single quotes when using ssh? | password636 | Shell Programming and Scripting | 3 | 05-29-2008 08:52 PM |
| echo using single quotes | chella | Shell Programming and Scripting | 3 | 10-29-2007 12:54 AM |
| Checking Single Quotes in C | janemary.a | High Level Programming | 3 | 06-07-2007 02:48 AM |
| im stuck! 'single quotes' | satnamx | UNIX for Dummies Questions & Answers | 4 | 03-29-2006 06:44 AM |
| Filename containing Single Quotes | phani | Shell Programming and Scripting | 6 | 03-30-2005 06:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
awk to print ' (single quotes)
I'm building a file with sql delete statements. I need to print the single quotes for the where clause.
i.e. delete from Command where CommandName = 'SomeName'; I have the following in my script input=$(pwd)/Cmnd.csv i=0 while read line do if test $i -ge 1; then echo "$line" | awk -F'|' '{print "delete from Command where CommandName='"$1"';}' >> deleteCmd.dat fi i=$i+1 done < $input This gives me: delete from Command where CommandName=; how do I print the (single quotes) ' with awk? |
|
||||
|
Code:
echo "FirstName|LastName" | awk -F"|" '{print "delete from Command where CommandName=\047"$1"\047"}'
delete from Command where CommandName='FirstName'
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|