[9814] in Athena Bugs
decmips 7.4G: sed
daemon@ATHENA.MIT.EDU (Tom Yu)
Wed Aug 19 19:47:25 1992
Date: Wed, 19 Aug 92 19:47:12 -0400
To: bugs@Athena.MIT.EDU
From: Tom Yu <tlyu@MIT.EDU> (Black Dragon)
Reply-To: <tlyu@MIT.EDU>
System name: hodge
Type and version: KN01 7.4G
Display type: PMAX-MFB
What were you trying to do?
use regular expressions in sed
What's wrong:
the \{m,n\} syntax for regexps in ed does not work:
/afs/athena.mit.edu/activity/r/rune/work; echo '12345asdf'|sed 's/\([0-9]\{1,\}\)\(.*\)/\2\1/'
12345asdf
/afs/athena.mit.edu/activity/r/rune/work; ed
a
12345asdf
.
s/\([0-9]\{1,\}\)\(.*\)/\2\1/p
asdf12345
What should have happened:
According to sed(1), sed uses the ed regular expressions, and
the ed(1) man page documents the use of \{m,n\}. Note that this appears
to be an Ultrix feature, and is not the case on a BSD machine.
Please describe any relevant documentation references:
ed(1), sed(1)