by Robert Peirce <bob@[EMAIL PROTECTED]
>
Feb 8, 2008 at 04:05 PM
In article <bob-FA4A41.10151308022008@[EMAIL PROTECTED]
>,
Robert Peirce <bob@[EMAIL PROTECTED]
> wrote:
> Does anybody have any idea why this works:
>
> IFS=' '
> exec 0< "db/s.d"
> while read line
> do
> set $line
> if (($3>0)) && ((${15}<16))
> then
>
> And this doesn't?
>
> exec 0< "s.p"
> while read line
> do
> set $line
> ((++wkcnt))
> if (($1>0)) [>0: arithmetic syntax error]
> then
Abject apologies for rank stupidity. Each line in the s.p file ends
with \r\n instead of just \n. It is necessary to replace "set $line"
with something like p=$(print $line | tr -d '\r'). Then ((p>0)) works
fine.
The \r crap is a holdover from Windows.
--
Robert B. Peirce, Venetia, PA 724-941-6883
bob AT peirce-family.com [Mac]
rbp AT cooksonpeirce.com [Office]