I have a directory like this:
dir
dir/somefile.txt
dir/subdir/subsub/somefile2.txt
dir/subdir2/somefile.txt
and I want to open all the files in all the subdirectories in a single instance of a command. I was trying find with -exec, or xargs, but these open each file with a separate instance of a command.
Basically, I want something that ends up like
kate dir/somefile.txt dir/subdir/subsub/somefile2.txt dir/subdir2/somefile.txt
, but for any number of files in any number of subdirectories. I'm using bash, but any script suggestions are fine.
clarification: I didn't just mean .txt files, but any ascii file (ie. .php, .txt, .html, etc..)