![]() |
|
|
|
|
|||||||
| 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 |
| Accessing PL/SQL OUT variables in Korn Shell Script | bright_future | UNIX for Advanced & Expert Users | 4 | 14 Hours Ago 09:02 AM |
| How to: Parse text string into variables using Korn shell | shew01 | Shell Programming and Scripting | 7 | 05-23-2008 07:01 AM |
| Variables Naming in Korn Shell | aldowsary | Shell Programming and Scripting | 1 | 03-19-2006 09:30 AM |
| AWK question in the KORN shell | penfold | Shell Programming and Scripting | 11 | 02-09-2005 06:14 AM |
| Question about Korn Shell | Latha Nair | Shell Programming and Scripting | 13 | 11-05-2003 04:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm using the following command to test for certain characters in a script
echo "${1}" | grep '\$' if (( ${?} == 0 )) then testing this script on the command line I have ksh -x script1.sh "xxxx$xxxx" this works fine but when I want to use ksh -x script1.sh "xxxx $xxx" the interpreter tells me that the field is blank. Why? it dosen't like space how do I get around this? My script will be passed variables with spaces in them. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
When passing arguments with special characters
for instance the "$" symbol, you should escape them assuming you wish them to be passed to the shell undisturbed. Otherwise, you command shell will try to interpret it first and pass those results to your script. try... ksh -x script1.sh "xxxx \$xxx" |
||||
| Google The UNIX and Linux Forums |