til/Development/Bash/Snippets.md

208 B

Snippets

Loop over files:

for filename in ./*.png
do
    echo "Processing $filename"
done

Basename:

# Output is image.png
basename image.png

# Output is image
basename image.png .png