bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

replace problem with GNU sed 3.02.80


From: Lee Howard
Subject: replace problem with GNU sed 3.02.80
Date: Wed, 24 Apr 2002 16:42:47 -0700

I'm experiencing problems with GNU sed 3.02.80 when using replace syntax and POSIXLY_CORRECT=1

bash-2.04$ sed --version
GNU sed version 3.02.80

Copyright (C) 1999 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.
bash-2.04$ export POSIXLY_CORRECT=1; echo "A" | sed '/A/s;;a;g'
aAa
bash-2.04$ export POSIXLY_CORRECT=1; echo "A" | sed 's/A/a/g'
a
bash-2.04$ unset POSIXLY_CORRECT; echo "A" | sed '/A/s;;a;g'
a
bash-2.04$ Is this behavior (A -> aAa) intentional? I thought that the 's/A/a/g' syntax would be identical in behavior to '/A/s;;a;g'.

Thanks.

Lee.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]