I am starting to port a vast swarm of ksh scripts from HP-UX to RedHat
Linux 7.2. I have immediately run into a discrepancy in ksh that has
me rather worried.
Here's a sample script:
echo "not a citrus fruit"
echo "$1 is a citrus fruit"
This works fine under HP-UX; ~/temp2 orange print "orange is a citrus
Under Linux, it fails to match the pattern--apparently, the | isn't
being recognized as a string separator. If I change the if statement
it works just fine on both HP-UX and Linux.
Now, when I read the manual, none of the examples are of the form:
but of the form:
I tried escaping the | with \, using ' instead of " around the list of
strings, to no avail. Any suggestions?
I expect that I am going to be a regular reader of this newsgroup for
the next few months, but I would appreciate if you could email me as
well as post your suggestions or answers.