|
Answer» when i execute a .ksh file (for example sh toto), i have error when executing commande contenning the caracter `. Thanks!Can you provide an example, with a sample of your error output? What editor are you using to create these scripts? (Some - like my favourite, joe - use the backtick operator as a metacharacter.)Sh toto.txt Please find below commands in toto file:
echo "toto" export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 OSTYPE=`uname -s` C=`echo "\c"` N=`-n`
when the sh execute the line containning the left quote(`), whe have the error below: C:\Temp>sh toto.txt toto [1] + Done(134) ? 3820 Abort toto.txt [1] + Done(134) ? 4452 Abort toto.txt [1] + Done(134) ? 4704 Abort toto.txt
Thanks!You posted: "when i execute a .ksh file (for example sh toto), "
By issuing the sh - it is a bash shell, not ksh (korn),
was that a TYPO in your post?I do have ksh.exe. Usually i use sh.exe to execute ksh scripts. It was working i dont know why now it not working any more. I beleive that the error is due to my machine. Because it works on another machine. Thanks!You MUST have a non-STANDARD .profile or SOMETHING, because I've run the script with no problem - except for the obvious: '-n' isn't a command, so the last line of the script will fail.
Please show me the output of the command "sh --version". Then attach copies of "~/.profile" and "/etc/profile" (as a zip file).Hang on a minute - "sh.exe"? Are you doing this on a Windows system? If so, you can't expect standard Linux/Unix FEATURES (such as backticks) to work as normal.
|