[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31261: -i replaces symlinks with new file
From: |
Daniel Bosk |
Subject: |
bug#31261: -i replaces symlinks with new file |
Date: |
Wed, 25 Apr 2018 21:38:07 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Hello,
Not sure if it's intended behaviour or not, but I didn't expect it and I
found no note in the man-page either. Consider the following:
echo "test" > testfile
ln -s testfile testlink
cat testfile testlink
sed -i "s/test/fail/" testlink
cat testfile testlink
The first cat will output "test\ntest". I would expect the second to
output "fail\nfail" but it outputs "test\nfail". The reason is that sed
has replaced the symlink with a new file instead of modifying the file
the symlink points to.
Thanks,
Daniel
signature.asc
Description: PGP signature
- bug#31261: -i replaces symlinks with new file,
Daniel Bosk <=