fix help text for -i

2011-08-29  Paolo Bonzini  <bonzini@gnu.org>

	* sed/sed.c (usage): Fix documentation for -i.  Reported by
	Dennis Bartlett.
This commit is contained in:
Paolo Bonzini committed 2011-08-29 10:29:38 +02:00
1 parent 257d20967c
commit b2a79b1be7
2 files changed
+9 -4

No files matched your search

+8 -3
View File
@@ -1,9 +1,14 @@
2011-08-29 Paolo Bonzini <bonzini@gnu.org>
* sed/sed.c (usage): Fix documentation for -i. Reported by
Dennis Bartlett.
2011-07-11 Jim Meyering <meyering@redhat.com>
avoid silent data loss when an input line is 231 bytes or longer
If one line in a file has length (including newline) of 231, then
avoid silent data loss when an input line is 2^31 bytes or longer
If one line in a file has length (including newline) of 2^31, then
applying sed -i to that file truncates it to size 0. I first
noticed it like this: Create a file with line of length 231-1
noticed it like this: Create a file with line of length 2^31-1
$ perl -le 'print "v"x(2**31-1)' > k
Then prepend a byte to that line:
$ sed -i 's/^/v/' k
+1 -1
View File
@@ -140,7 +140,7 @@ Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
follow symlinks when processing in place\n"));
#endif
fprintf(out, _(" -i[SUFFIX], --in-place[=SUFFIX]\n\
edit files in place (makes backup if extension supplied)\n"));
edit files in place (makes backup if SUFFIX supplied)\n"));
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
fprintf(out, _(" -b, --binary\n\
open files in binary mode (CR+LFs are not processed specially)\n"));