bug-sed
[Top][All Lists]
Advanced

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

bug#32069: Man page description is wrong for -i


From: Matthew Jenkins
Subject: bug#32069: Man page description is wrong for -i
Date: Thu, 5 Jul 2018 19:30:15 -0500

address@hidden ~]$ sed --version
sed (GNU sed) 4.5
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
E-mail bug reports to: <address@hidden>.




On Fedora 28.

In the man page the description for -i is as follows:
       -i[SUFFIX], --in-place[=SUFFIX]

              edit files in place (makes backup if SUFFIX supplied)


However the actual behavior is it's replacing the original with a copy
and not editing in place. This can cause confusion for why sed is
breaking hardlinks. Example:

address@hidden test]$ touch banana
address@hidden test]$ stat banana | grep Inode
Device: fd07h/64775d Inode: 8782051     Links: 1
address@hidden test]$ sed -i '' banana
address@hidden test]$ stat banana | grep Inode
Device: fd07h/64775d Inode: 8781989     Links: 1

I'm pretty sure replacing with the copy is intentional behavior, so
can the manual be updated to reflect this?


Thanks,
Matthew





reply via email to

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