I'm trying to execute a command for each file in a directory but while using their absolute path (such as /home/richi/mydir/myfile.py
) instead of their relative path (such as myfile.py
).
In other words, I want to execute a command on files in a directory based on their absolute path - similar to for file in *.py; do thecommand -a "$file"; done
but not quite.
I'm asking this because I'm trying to implement a Travis CI script running in an Ubuntu 14.04 environment which will install and use pyminifier
to recursively minify all the Python code files in a directory.
Please note that I'm asking may be similar to this post but it's not.