![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search excat string in another string (grep "fails") | bora99 | UNIX for Dummies Questions & Answers | 0 | 06-05-2008 03:41 AM |
| How to include RETURN KEY with Background process "&" in Shell Script | racbern | Shell Programming and Scripting | 1 | 03-11-2008 04:30 AM |
| "include" directory is not there | Katkota | UNIX for Dummies Questions & Answers | 10 | 01-01-2008 09:07 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 10:52 PM |
| how to include slashes "/" in @ARGV (Perl) | umen | Shell Programming and Scripting | 3 | 01-30-2006 08:21 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I include "$" in a string
I have the following code.
Code:
sqlString="CREATE USER $1 IDENTIFIED BY $3
DEFAULT TABLESPACE TEMPTABS
TEMPORARY TABLESPACE TEMPSEGS
QUOTA UNLIMITED ON TEMPTABS
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT xxxxxx_ROLE TO $1;
ALTER USER $1 DEFAULT ROLE xxxxxx_ROLE;
CREATE USER $2 IDENTIFIED EXTERNALLY
DEFAULT TABLESPACE TEMPTABS
TEMPORARY TABLESPACE TEMPSEGS
QUOTA UNLIMITED ON TEMPTABS
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT xxxxxx_ROLE TO $2;
GRANT yyyyyy_ROLE TO $2;
ALTER USER $2 DEFAULT ROLE xxxxxx_ROLE,yyyyyy_ROLE;
exit;"
echo "$sqlString" > $APP_HOME/test/EMPMC.$$
sqlplus system/xxxxx @$APP_HOME/test/EMPMC.$$
rm $APP_HOME/test/EMPMC.$$
I get an error message that the APPLE variable is not defined. How do I pass the argument without unix interperting the "$APPLE" as a variable. Any help would be appreciated. I should know this, but it has been a while since I did scripting. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
try OPS\$APPLE
|
|
#3
|
|||
|
|||
|
Thank you very much. That fixed the problem.
Last edited by beilstwh; 06-08-2006 at 06:05 AM. |
|||
| Google The UNIX and Linux Forums |