Quote:
|
Originally Posted by blowtorch
If using Solaris, bash may not be installed. Use ksh. Change the #!/bin/sh to #!/bin/ksh. I don't know if what you are trying works with ksh or not though.
|
The construct ${line:0:2} will not work with ksh. You will have to rewrite that part of the code. Use typeset. Something like
Code:
typeset -L2 string
string=$line
if [[ "$string" == "< " ]] ; then
echo ${line#$string} is removed.
fi;