Such code
$ ls {a,b}{c,d}
runs ls command on following files: ac, ad, bc, bd.
Is there a simple way to reverse resolution order and generate such sequence: ac, bc,ad, bd?
edit
I want to run grep on particular subset of files inside a subset of directories like this:
$ grep 'find this' {sub_dir_one,sub_dir_two}/some_loc/{file_one,file_two}
I want lines from both file_one, then both file_two with respect to sub_dir_one and sub_dir_two order.
I just wonder if there's some nice trick which prevents me from using loop.