3 ms·
As did Knuth's; see below the discussion about that. If you wanted to change it, to split "words" by blanks and punctuation characters, you would have tr -s
by lsb 15y ago
As did Knuth's; see below the discussion about that.
If you wanted to change it, to split "words" by blanks and punctuation characters, you would have
tr -s [:blank:][:punct:] "\n"
and then that piece would fit into the pipeline, the rest unscathed. This design is far easier to reason about than a dozen pages of Pascal.
- ralph 15y agoThose globs should be protected from the shell otherwise ./bc is going to alter tr's arguments.