How to join multiple lines of file names into one with custom delimiter?
EDIT: Simply "ls -m" If you want your delimiter to be a comma
Ah, the power and simplicity !
ls -1 | tr '\n' ','
Change the comma "," to whatever you want. Note that this includes a "trailing comma" (for lists that end with a newline)
Similar to the very first option but omits the trailing delimiter
ls -1 | paste -sd "," -