$ whatis rsrs (1) - reshape a data array
$ grep '^oxym' /usr/share/dict/words | rs -C, 1oxymandelic,oxymel,oxymethylene,oxymoron,oxymuriate,oxymuriatic,
[ Home | Post Entry | Log in | Search | Browse Options | Site Map ]
no subject
$ whatis rs
rs (1) - reshape a data array
Invoked as "rs -C, 1" it will convert an input separated by newlines to a comma separated output:
$ grep '^oxym' /usr/share/dict/words | rs -C, 1
oxymandelic,oxymel,oxymethylene,oxymoron,oxymuriate,oxymuriatic,
Plus you can undo the transformation too, if you pipe the comma separated input through "rs -c, 0 1" (lower case c).
The downside is that rs will leave you with a trailing comma, but as long as that's not an issue it's a pretty neat trick.