by jftuga · 2y ago · 0 comments
Contrived example, for brevity:
awk 'BEGIN { while (i < 10) print i++ }' | paste -sd, -
or maybe: ls *txt | paste -sd, - 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.It's fascinating that there are so many different ways to do things, even within the limited confines of coreutils!
seq 10 | paste -sd, -