Hi frieds, I don't understand the difference between single square bracket and double square brackets in a IF condition.
Ex.
there is a word "welcome[world]"
output should be "welcome\[world\]
i am using regsub to add backslash "\" in place where ever i find square brackets (open or close)..
But i am not getting it... pls help out..
set a {welcome[world]}
set d [regsub -all "(?q)\[" "$a" /\[]
I have a directory "a b c/x y z"
I would like to assign it an environment variable so I can "cd" to it, as in:
A="a b c/x y z";export A
so that I can "cd $A".
I've tried single quotes, double quotes, backslashes and permutations thereof, but NOTHING works.:wall:
Any help would be graciously accepted.
Hi all. i need a small help.
i have written an exit code, which will check whether mo.sh is successful or not. if the status is >0 it will exit the shell.
1>Do you guys think it is a correct way to write?
2>what if i change the double bracket to single. how will it change the o/p.
Code:
mo.sh
if [[ $?
HTML help passing variable value to a script.
--------------------------------------------------------------------------------
I want to make a web page that has a text box with a send button.
How should the html line be edited to send the text to the script as a variable 'a' and then store it in a variable in the script located at /usr/lib/cgi-bin?
Hi,
I am doing an AWK in ksh as below with the string to search to be read from variable but for some reason there is no output.
Gurus,
I am trying to display a match (single character) from beginning of the line in a file using a variable.
I tried using sed ... not sure where am doing it wrong...
Code:
sed -n "/^\$variable/p" FileName.sh
or
Code:
sed -n "/^\${variable}/p" FileName.sh
Both of the above are not working.....Thanks for your help in advance..
In the wake of the post: how-parse-following-xml-file
Thank you for the very useful chakrapani response 302355585-post4 !
A close question.
How to pass a file to xmllint in variable?
For example, let it be:
Code:
NEARLY_FILE='<?xml version="1.0" encoding="iso-8859-1"?><html><set label="09/07/29" value="1241.90"/></html>'
Then I
Hi all,
I want to use a variable inside my sql query and below is my script:
Code:
#!/bin/ksh
export b="abcd"
a=`sqlplus -s abc/def@ghi <<++
set heading off;
set feedback off;
select xxx from mytable where clmn_nm='$b';
exit;
++`
echo $a
But the output i get is below:
Code:
$> sh sqltry.sh
$>
I am not able to figure out why the query is not taki