Public bug reported:

When using 'sed -i' on a symlink the symlink gets destroyed.
Observe:

% ls -l myfile symlink
-rw-rw-r-- 1 miekg miekg 12 Apr 26 10:53 myfile
lrwxrwxrwx 1 miekg miekg  6 Apr 26 10:53 symlink -> myfile

# do an edit
% sed -i 's/hello//' symlink

% ls -l myfile symlink
-rw-rw-r-- 1 miekg miekg 12 Apr 26 10:53 myfile
-rw-rw-r-- 1 miekg miekg  7 Apr 26 10:54 symlink

And gone is your symlink.

This either a feature or a bug :)

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

-- 
sed -i destroys symlink
https://bugs.launchpad.net/bugs/367211
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to