iterate over files in directory

To do not forget:

FILES=/path/to/*
for f in $FILES
do
     filename=${f##*/}
     echo $filename
done

More informations: http://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion

About Saïd

Software developer.

This entry was posted in Shell. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *