Thread View: gnu.utils.bug
2 messages
2 total messages
Started by Margaret Ann Metcalf
Sat, 28 Oct 1989 00:12
problems with sed
Author: Margaret Ann Metcalf
Date: Sat, 28 Oct 1989 00:12
Date: Sat, 28 Oct 1989 00:12
63 lines
2567 bytes
2567 bytes
This is to report a bug found with gnu sed versions 1.02 and 1.06.
Problem lies in asking sed to perform branches (b label).
Error message is
/usr/local/gnu/bin/sed: Can't find label for jump to ''
Machines are Sun3 runing SunOS 3.4, Sun SPARCStation running
SunOS 4.0.3, Sun 386i running SunOS 4.0.1. Only version 1.06 was
tried on SPARC and Sun386i.
Here are details on script used for test. Script used for test is
known to work with /bin/sed (Sun's sed). It was modified only to
specify use of GNU sed. Script expects input lines in format of
/etc/passwd with hostname prepended. I.E.,
ra|root:lWlgn9USZ1TPI:0:1:System Administrator:/:/bin/csh
Expected output is of form
Administrator, System root 0 ra /
Here's script
#!/bin/sh
/usr/local/gnu/bin/sed \
-e ':jr' \
-e '/ Jr[^:]*:/ {' \
-e '/:\([^: ]*\) \([^: ]*\) Jr[\.]*:/s//:\2, \1 Jr.:/' \
-e '/:\([^: ]* [^: ]*\) \([^: ]*\) Jr[\.]*:/s//:\2, \1 Jr.:/' \
-e 'b all' \
-e '}' \
-e ':3d2p' \
-e '/[^:]*:[^:]*:[^:]*:[^:]*:[^ ]* [^ ]* [IV]*:/ {' \
-e '/:\([^: ]*\) \([^: ]*\) \([IV\.]*\):/s//:\2, \1 \3:/' \
-e 'b all' \
-e '}' \
-e '/^\([^:]*:[^:]*:[^:]*:[^:]*:\)\([^: ]* [^: ]*\) \([^: ]*\) \([IV\.]*\):/{' \
-e 's//\1\3, \2 \4:/' \
-e 'b all' \
-e '}' \
-e ':3pn' \
-e '/^\([^:]*:[^:]*:[^:]*:[^:]*:\)\([^: ]* [^: ]*\) \([^: ]*\):/ {' \
-e 's//\1\3, \2:/' \
-e 'b all' \
-e '}' \
-e ':2pn' \
-e '/^\([^:]*:[^:]*:[^:]*:[^:]*:\)\([^: ]*\) \([^: ]*\):/ {' \
-e 's//\1\3, \2:/' \
-e 'b all' \
-e '}' \
-e ':all' \
-e '/^\([^:| ]*\)[| ]*\([^:]*\):[^:]*:\([^:]*\):[^:]*:\([^:]*\):\([^:]*\).*/ {' \
-e 's//\4 \2 \3 \1 \5/' \
-e 'b' \
-e '}' \
# -e 's/^\([^:]*\):[^:]*:/\1::/' \
# 1=machine 2=login 3=uid 4=name 5=home
# juniors - handle various forms then kick out
# thirds - handle various forms then kick out
# 3 part names
# 2 part names
# all lines - strip out password field
thanks,
mam@umb.umb.edu
Re: problems with sed
Author: Tapani Tarvainen
Date: Sat, 28 Oct 1989 08:41
Date: Sat, 28 Oct 1989 08:41
27 lines
1501 bytes
1501 bytes
In article <8910280012.AA06569@ra.umb.edu> mam@ra.umb.edu (Margaret Ann Metcalf) writes: >This is to report a bug found with gnu sed versions 1.02 and 1.06. >Problem lies in asking sed to perform branches (b label). >Error message is > /usr/local/gnu/bin/sed: Can't find label for jump to '' >Here's script The offending line was this: > -e 'b' \ 'b' or 't' without a label were compiled incorrectly (they should branch to the end of script). Fixing this required small changes in setup_jump and in main() at the point where jump addresses were stored (the execution phase already tested for this). The fixed version can be obtained via anonymous ftp from tukki.jyu.fi (128.214.7.5) in ~ftp/pub/sed/gnused106t2.tar.Z (or by sending me mail). Incidentally, if anybody has ftp'd gnused106t1.tar.Z there was another bug which is also corrected now (it wouldn't compile with non-ANSI compilers because I'd forgotten to add non-ANSI declaration for two functions). -- Tapani Tarvainen (tarvaine@tukki.jyu.fi, tarvainen@finjyu.bitnet)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads