Re: strange error message

2006-12-29 Thread guy keren

you have a redundant ';' character in:  

Z4=`expr $Z3; + 9`

--guy

On Fri, 2006-12-29 at 19:49 +0200, Avraham Rosenberg 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 ?
 
 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]


=
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]



Re: strange error message

2006-12-29 Thread Maxim Veksler

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]



Re: strange error message

2006-07-31 Thread Dan Kenigsberg
I have a vague memory that bidiv 1.4 had a buffer overflow bug. Which version
are you using? Do you have a specific doc where you reproduce the error? Could
you share it with us? What is your locale?

On Mon, Jul 31, 2006 at 07:41:02AM +0300, Avraham Rosenberg wrote:
 Hi,
 I use the following script to read simple Hebrew doc documents:
 #!/bin/sh
 /usr/bin/antiword -w 70 $2 -m 8859-8.txt $1 | /usr/bin/bidiv  -j -w 70 | sed 
 's/[ ][  ]*$//' |  sed -e :a -e 's/^.\{1,69\}$/ /;ta'
 
 Lately (maybe this has to do with the move to a 64-bit system) I
 get the following error message (usually after the job is
 properly done):
 *** glibc detected *** free(): invalid next size (fast): 0x005024a0 
 ***
 
 Trying to paste the error message (or parts of it) into google
 linux search,was fruitless.
 Any ideas ?
 
 PS The sed command got clobbered in the pasting process. It just
 says: delete any number of blancs and/or tabs at the end of the
 line.
 
 Thanks, Avraham

-- 
Dan Kenigsberghttp://www.cs.technion.ac.il/~dankenICQ 162180901

=
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]



Re: strange error message

2006-07-31 Thread Avraham Rosenberg

On Mon, Jul 31, 2006 at 10:46:56AM +0300, Dan Kenigsberg wrote:
 I have a vague memory that bidiv 1.4 had a buffer overflow bug. Which version
 are you using? Do you have a specific doc where you reproduce the error? Could
 you share it with us? What is your locale?
 
 On Mon, Jul 31, 2006 at 07:41:02AM +0300, Avraham Rosenberg wrote:
  Hi,
  I use the following script to read simple Hebrew doc documents:
  #!/bin/sh
  /usr/bin/antiword -w 70 $2 -m 8859-8.txt $1 | /usr/bin/bidiv  -j -w 70 | 
  sed 's/[   ][  ]*$//' |  sed -e :a -e 's/^.\{1,69\}$/ /;ta'
  
  Lately (maybe this has to do with the move to a 64-bit system) I
  get the following error message (usually after the job is
  properly done):
  *** glibc detected *** free(): invalid next size (fast): 0x005024a0 
  ***
  
  Thanks, Avraham
 
 -- 
 Dan Kenigsberghttp://www.cs.technion.ac.il/~dankenICQ 
 162180901
Hi Dan,
Thanks for the answer
1-I am using version 1.4-4. According to the Changelog, it was
built against fribidi 0.10.4-6 by Baruch Even on 28.10.2004.
2-My locale is C
3-I attach the shortest doc I was able to find on my machine
4-The following modification of the script does not elicit any 
protests, and the output is the correct one:
#!/bin/sh
/usr/bin/antiword -w 70 $2 -m 8859-8.txt $1 | /usr/bin/bidiv  -j -w 140 | sed 
's/[  ][  ]*$//' |  sed -e :a -e 's/^.\{1,69\}$/ /;ta' 
(same remark about the first sed command)
5 My font is heb24-etl.pcf.gz 
-etl-fixed-medium-r-normal--24-240-72-72-c-120-iso8859-8

Cheers, Avraham


-- Binary/unsupported file stripped by Listar --
-- Type: application/msword


=
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]



Re: strange error message

2006-07-31 Thread Dan Kenigsberg
 From one reason or another I got your mail only through the list, which
filtered out your doc example. You may try to send it to me offlist again.
Independently, you may try upgrading to bidiv 1.5. As I told you, 1.4 had a bug
that may cause the memory management error you see.

On Mon, Jul 31, 2006 at 06:05:59PM +0300, Avraham Rosenberg wrote:
 
 -- Binary/unsupported file stripped by Listar --
 -- Type: application/msword
 


-- 
Dan Kenigsberghttp://www.cs.technion.ac.il/~dankenICQ 162180901

=
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]