Public bug reported:

Program: GNU sed version 4.1.5

Steps for bug reproduction are as follows:

# Generate file called "a" with one line consisting of "1234"
echo "1234" > a

# Causes the line "1234" to become "a234" in file "a"
sed -ri 's/1/a/' a # Proper behaviour

# Causes the line "a234" to become "ab34" in file "a"
# However, another file called "ar" has been generated with the line "a234" 
(which are the previous contents of "a")
sed -ir 's/2/b/' a # Improper behaviour

This can be done without any commands.
Example:
touch b; sed -ir '' b # Creates file 'br' which should not exist

I ran this test using the LiveCD (to check if any updates might be
related to the bug) and found that the bug could be reproduced there as
well.

If more information is required then I will provide it.

** Affects: sed (Ubuntu)
     Importance: Undecided
         Status: New

-- 
In sed, -ir options generate second file with r appended to end of name
https://bugs.launchpad.net/bugs/271606
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to