[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turkish patch problem: sed and binary files
> Hi
>
> I upgraded to Mandrake 8.1. Among the upgrdes were netscape (to 4.78,
> which means that I had to repatch it) and an upgrade of sed, to
> sed-3.02-12mdk .
>
> I re-ran the turkish patch script, and noticed that it doesn't do
> anything.
>
> The body of this script is:
>
> ${SED} < ${NETSCAPE}.old -e 's/8859-8/8859-z/g' \
> -e 's/88598/8859z/g' -e 's/8859_8/8859_z/g' | \
> ${SED} -e 's/8859-9/8859-8/g' -e 's/88599/88598/g' \
> -e 's/8859_9/8859_8/g' -e 's/Turkish/Hebrew /g' \
> -e 's/turkish/hebrew /g' -e 's/\[tr\]/\[he\]/g' | \
> ${SED} -e 's/8859-z/8859-9/g' -e 's/8859z/88599/g' \
> -e 's/8859_z/8859_9/g' > $NETSCAPE
>
> After some elimination I noticed that sed does not seem to work with
> binaries:
>
Works with a binary here, although not as I expected:
[19:35:35 tmp]$ file /usr/lib/netscape/473/navigator/navigator-smotif.re
al
/usr/lib/netscape/473/navigator/navigator-smotif.real: ELF 32-bit LSB
executable, Intel 80386, version 1, dynamically linked (uses shared
libs), stripped
[19:36:27 tmp]$ strings /usr/lib/netscape/473/navigator/navigator-smotif
real | head -2
/lib/ld-linux.so.2
__gmon_start__
[19:36:40 tmp]$ sed -ne '/lib/p' /usr/lib/netscape/473/navigator/navigat
or-smotif.real |head -2
directory called `app-defaults' somewhere under /usr/lib/.%s:
couldn't find our resources?
directory called `app-defaults' somewhere under /usr/lib/.%s:
invalid geometry specification.
[19:37:14 tmp]$
I was expecting to see the `/lib/ld-linux.so.2' string. Those other
strings come after it.
Could be an RE thing?
[19:38:49 tmp]$ file -v
file-3.33
magic data from /etc/magic:/usr/share/misc/magic
[19:38:53 tmp]$ strings -v
GNU strings 2.11.92.0.5 20011005
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License. This program has absolutely no
warranty.
[19:38:56 tmp]$ sed -V
GNU sed version 3.02
Copyright (C) 1998 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE,
to the extent permitted by law.
[19:39:01 tmp]$
> [tzafrir@canada1 ~ ]$ cat /usr/lib/netscape/netscape-communicator.old |sed -e 's/8859-8/8859-z/g' |strings |grep 8859-8
> *documentFonts.charset*iso8859-8: x-ignore
> iso-8859-8
> ISO8859-8
Same output here.
> [tzafrir@canada1 ~ ]$ cat /usr/lib/netscape/netscape-communicator.old |strings|sed -e 's/8859-8/8859-z/g' |strings |grep 8859-8
> ( No output )
Were you expecting to get some output? You replaced the last 8 and then
you looked for it.
[19:46:45 tmp]$ cat /usr/lib/netscape/473/navigator/navigator-smotif.rea
l |strings|sed -e 's/8859-8/8859-z/g' |strings |grep 8859-z
*documentFonts.charset*iso8859-z: x-ignore
iso-8859-z
ISO8859-z
[19:47:35 tmp]$
> [tzafrir@canada1 ~]$ cat /usr/lib/netscape/netscape-communicator.old |perl -p -e 's/8859-8/8859-z/g' |strings |grep 8859-8
> ( No output )
>
> I figure I could rewrite this script using perl. But is there a better
> alternative?
>
> (It worked before...)
>
> --
> Tzafrir Cohen
> mailto:tzafrir@technion.ac.il
> http://www.technion.ac.il/~tzafrir
>
>
>
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
>
--
When responding, please quote the entire message.
Shaul Karl <shaulka@bezeqint.net>
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il