I would like to join the result of ls -1 into one line and delimit it with whatever i want.

Are there any standard Linux commands I can use to achieve this?

22 s
22

Similar to the very first option but omits the trailing delimiter

ls -1 | paste -sd "," -

Leave a Reply

Your email address will not be published. Required fields are marked *