Loop over files (Bash)

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 8 aug 2022 om 07:34 (Nieuwe pagina aangemaakt met 'This is cool: You can loop over files in a directory and do stuff with it! == Simple example == <pre> #!/bin/bash cd ~/images-tmp for file in * do echo "File...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Naar navigatie springen Naar zoeken springen

This is cool: You can loop over files in a directory and do stuff with it!

Simple example

#!/bin/bash

cd ~/images-tmp
for file in *
do
   echo "File name: $file"
done	

Sources