What's a simple way (e.g. no perl) to turn the output of (e.g.) ls into ":"-delimited instead of "\n"-delimited?
I'm hoping for a sed or possibly awk short one-liner, I couldn't figure out how to get those to treat \n
as a character that wasn't a line-delimiter though.
I know Perl regexes provide this via an option, I think /m or /s or something. Which one is it?
ls | tr "\n" :
ls | awk -vORS=: 1