My new USRobotics Sportster Voice 56K Faxmodem

Joseph Kwok (jkwok@net123.com.hk)
Fri, 17 Apr 1998 03:12:15 +0200




Martin Fick wrote:

> Try putting it in quotes when echoing it.
>
>    echo "$pages"
>
> Shells tend to treat non-quoted strings as lists.  List
> elements are separated by a space or any other white
> space.  When echoing without quotes, you get the list of
> elements.  With quotes it's like a string.
>
> -Martin Fick

Yes, you are right.  It turns back to be in multiple lines.  Anyway, the
faxspool line #810 in mgetty-1.1.12 was:
    maxnr=`ls | wc -l tr -d " "`
and this works fine.  But in mgetty-1.1.14, faxspool line #810 becomes:
    maxnr=`echo $pages | wc -l | tr -d " "`
That create the problem that the counting is wrong.  At least for my
version of "echo".  Therefore, the recommended fix is either quoted the
"$pages" or use wc -w instead.

Regards,
Joseph