Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I separate .sh files into a list?

I have tried:

ls *.sh  | xargs sed 's/\n/ /g' > out.txt

The return of ls *.sh is a long string with '\n' in the middle.

share|improve this question
add comment

1 Answer

You can try to use:

ls -1 *.sh
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.