Using a shell script, I'd like to find all directories within a directory (not recursively) that begin with a particular prefix, then loop through them. Pseudocode example:
array directories = find('/etc/build', 'project-build-*');
foreach (string directory in directories)
{
// directory == 'project-build-example-x64'
do_something_with('/etc/build/' + directory + '/Makefile');
}
for dir in "/etc/build/project-build-"*/
do
do_something_with "$dir"Makefile
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With