Martin Natano wrote: > On Mon, Apr 18, 2016 at 07:11:46PM -0400, Christian Heckendorf wrote: > > Hi, > > After reading the man page description of tr -s, I couldn't understand > > what it meant to "squeeze" characters. It could be that 'squeeze' is a > > mnemonic for '-s' but it's not helpful as a technical explanation. > > Your diff removes information: One of those repeating characters > remains. I don't see what's wrong with the current description; it seems > perfectly legible to me, as long as you know the meaning of the word > "squeeze". It can also mean something like "compress", which is what -s > does. > > natano >
I read my changes as "the repetitions" being removed, but I can see how it can be ambiguous. My problem with the current wording is that, as you hinted at, it only makes sense once you understand how the tool and option behave. This doesn't seem ideal for a manual. If I squeeze two grapes, they do not become one grape. The current wording also does not mention that the "squeezing" is only done on adjoining characters. Here is a revised diff. Index: tr.1 =================================================================== RCS file: /cvs/src/usr.bin/tr/tr.1,v retrieving revision 1.25 diff -u -p -r1.25 tr.1 --- tr.1 28 Feb 2015 21:51:57 -0000 1.25 +++ tr.1 19 Apr 2016 13:03:46 -0000 @@ -82,12 +82,12 @@ option causes characters to be deleted f .It Fl s The .Fl s -option squeezes multiple occurrences of the characters listed in the last -operand (either +option replaces multiple consecutive occurrences of the characters listed in +the last operand (either .Ar string1 or .Ar string2 ) -in the input into a single instance of the character. +in the input with a single instance of the character. This occurs after all deletion and translation is completed. .El .Pp
