'Submit slurm job script in sub-folders

I have multi sub-folders (say 1,2,3....) inside a parent folder (say A,B,C....). Each script contains ".sh" file and associated loading files.

What would be the quick way to submit all the script files rather than moving across each sub-folder?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source