I am trying to write a bash script which can get all the file names from a folder and execute another Python script which takes one file name at a time.
How do I do that?
1 Answer 1
for file in /path/*
do
python main.py "$file"
done
answered Oct 27, 2015 at 23:59
stanleyli
1,4971 gold badge13 silver badges31 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default
forcommand.