madmat
1
Hi All
I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell.
Some operations like calculation don't work :
cat ${file1} | tail -$((${num1}-${num2})) > ${file2}
Is it possible to activate Korn Shell functionnalities in Bourne Shell script ?
Many thanks
You'll need to rewrite the script using an external command (expr?),
the Bourne shell does not provide a builtin arithmetic expansion.
methyl
3
Have you tried a shebang line at the top of the script?
#!/bin/ksh
Can you say which Operating System(s) (with version) are giving difficulty?
kshji
4
Or maybe you can download ksh ?
Or maybe you have also bash ? Those lines works also in bash.