![]() |
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 |
| Escape character - sed | c00kie88 | Shell Programming and Scripting | 6 | 10-08-2008 02:33 AM |
| Escape character | deepakpv | Shell Programming and Scripting | 4 | 02-16-2007 03:19 AM |
| awk / escape character | OFFSIHR | Shell Programming and Scripting | 8 | 11-29-2006 01:28 PM |
| Escape character in vi? | stevefox | Shell Programming and Scripting | 4 | 11-17-2005 03:38 PM |
| possible to escape the \ character in sed? | gammaman | UNIX for Dummies Questions & Answers | 1 | 07-07-2005 02:49 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello experts
I am trying to write a shell script which will add ' ' to a unix variable and then pass it to oracle for inserting to a table. I am running the script as root and I have to do a su -c . The problem is the character ' is not recognised inside sed even after adding escape character \ Here is my script ---------------------- su - oracle -c '. $HOME/.profile; a=10;quote=`echo a | sed -e s/a/\'/g`;echo $quote;hosted=`hostname`; host=$quote$hosted$quote; sqlplus scott/tiger <<EOF insert into unix_box values($host,0,sysdate); commit; EOF ' ----------------------- Error -> test3.sh: 0403-057 Syntax error at line 1 : ``' is not matched. How can we add the escape character ' to quot variable . I am running this script on AIX 5 under shell sh. Thanks & Regards Vedaa |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|