A simple utility for concatenating lines from stdin.
I often find myself in the situation where I need to scrape data from logs,
use combinations of
sed to extract values,
then turn those values into various SQL queries.
The last step is always the most annoying, so I decided to spend a few minutes to make this tool.
Lassie Flipper Willy
Put everything together with no delimiter or quote marks:
$ cat animals.txt | concat LassieFlipperWilly
$ cat animals.txt | concat -q "'" 'Lassie''Flipper''Willy'
$ cat animals.txt | concat -d ", " Lassie, Flipper, Willy
$ cat animals.txt | concat -q "'" -d ", " 'Lassie', 'Flipper', 'Willy'