4 ms·
Brilliant to begin every video with "blah is my favorite command." I watched the video for 'paste' first and I thought it wonderful that someone else also think
by jeffbee 2y ago
Brilliant to begin every video with "blah is my favorite command." I watched the video for 'paste' first and I thought it wonderful that someone else also thinks paste is their favorite.
- robertelder 2y agoThis is my favorite observation.
- jftuga 2y agoI like using paste to convert a list of lines into a single line, comma-delimited list... Contrived example, for brevity: awk 'BEGIN { while (i < 10) print i++ }' | paste -sd, - or maybe: ls *txt | paste -sd, -
- paradox460 2y agoFwiw you can do that with just awk, no pipe and paste required
- maleldil 2y agoI like using paste to sum over numbers where each number is in a distinct line. E.g.: printf "1\n2\n3" | paste -sd+ | bc 6 I suppose you could do that more cleanly with awk, but this has worked whenever I needed it. I find it easier to type.
- tacostakohashi 2y agoI'd just do that with tr '\n' , It's fascinating that there are so many different ways to do things, even within the limited confines of coreutils!
- monista 2y agoseq 10 | paste -sd, -