code-snippets/shell/collectionfor.sh

12 lines
219 B
Bash
Raw Normal View History

2024-04-08 18:35:01 -04:00
#!/bin/bash
# READ ALL WEBP FILES FROM A FOLDER
# AND DO SOMETHING TO EACH OF THEM
files=$(ls | grep .webp)
for file in $files
do
name=$(echo $file | cut -f 1 -d '.')
echo "$name, /emoji/random/$name.webp"
done