Bash join ls output Bash join ls output bash bash

Bash join ls output


No need to run ls twice, just put multiple file specifications as arguments.

ls /path/to/first_file_spec* /different_path/to/second_file_spec*


(ls <first dir>; ls <second dir>) | sort ...


This should do it:

{ ls folder1 && ls folder2; }

Got this from:

Try this example:

{ ls /etc/fonts && ls /etc/init; }|while read i; do echo $i; done

(hope you have these folders - replace if you don't).