Recently I had a script that I needed to run about 100 times in a row. This little one liner came in super handy for that. Replace “COMMAND” with the command that you want to run. In this example, the command will run 100 times in a row!
for i in `seq 100`; do COMMAND; done
Just like my last post, I was working with a directory of about 1000 files. There were all sorts of problems with the way they were named. Anyone who is used a *nix type system will know that “.jpg”, “.Jpg”, “.JPG” are all very separate things. To solve the issue I was having I needed to rename all of the files in the directory to lowercase.