flightless bird
March 1st, 2008, 08:39 AM
I would like to work out how to recursively expand filenames in bash, so instead of expanding some_directory/* to some_directory/sub-directory1
some_directory/sub-directory2
some_directory/some_file1
some_directory/some_file2 I could expand it to some_directory/sub-directory1/some_file1
some_directory/sub-directory1/some_file2
some_directory/sub-directory2/some_file1
some_directory/sub-directory2/some_file2
some_directory/some_file1
some_directory/some_file2As far as I know, bash doesn't do this itself, I'm not sure how tioget ls to do it neatly, and while I am aware that ksh does it, I would prefer to stay with bash, all things being equal. Any ideas?
some_directory/sub-directory2
some_directory/some_file1
some_directory/some_file2 I could expand it to some_directory/sub-directory1/some_file1
some_directory/sub-directory1/some_file2
some_directory/sub-directory2/some_file1
some_directory/sub-directory2/some_file2
some_directory/some_file1
some_directory/some_file2As far as I know, bash doesn't do this itself, I'm not sure how tioget ls to do it neatly, and while I am aware that ksh does it, I would prefer to stay with bash, all things being equal. Any ideas?