Ok, so I have a bunch of test_xx and validate_xx files that I want to execute in the following way:
./path/test_01 | ./server | ./path/validate_01
./path/test_02 | ./server | ./path/validate_02
... And so on.
Now then, I want to create a run_all script that will locate all of these other scripts and run them all in this way.
I can use the following code to find and execute only, for example, test_01:
find ./*/ -name test_01 -exec {} \;
So, I have two problems:
(Important!) How can I make bash execute the more complicated line above, with piping and two unknown directories to search for? I can only find how to execute a single command.
(Less important, but still an issue...) What would be the best way to loop this script, so that it executes all test/validate scripts in the directory, then stops? The scripts are currently named test_01, test_02, ..., test_26 (and similarly for validate_xx) - but I want to script to still work, without changing, if I add test_27 etc.
echo {} | sed 's/test_/validate_/''