On 12/29/06, Avraham Rosenberg <[EMAIL PROTECTED]> wrote:
Hi,
Thank you very much for the good advices.
Now, to a question more related to linux.
I wrote this small script to get a more pleasing output from
bidiv:
#!/bin/sh
case $# in
        0)echo "Use: $0 file_name width additional_options";;
        1)echo "Use: $0 file_name width additional_options";;
        *) Z1=$1; Z2=$2; shift 2; Z3=`expr $Z2 + 10`; Z4=`expr $Z3; + 9`; cat $Z1 | sed 'G' | 
fmt -w $Z2 | bidiv -j -w $Z3 | sed -e :a -e "s/^.\{1,$Z4\}$/ &/;ta" | sed 
'/^$/d'  $*;;
esac

It does what it is supposed to do, but issues every time the
following error message:
/home/avraham/scripts/newbidiv: line 1: +: command not found

I see no + over there. I entered this line in the script in Vim through
:r ! head -1 some-other-script
(because, otherwise, from time to time I enter !# instead of #!)
and /bin/sh is indeed a link to bash.
I do not receive this error message with any other of my scripts.
Any ideas ?


Could "Z4=`expr $Z3; + 9`" be the problem?

It basically says:
1. Evaluate $Z3
2. Wait for expr to finish
3. execute "+" with 9 as $1 parameter.


Thanks, Avraham

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




--
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to