this post was submitted on 01 Dec 2024
407 points (99.5% liked)

Bash

763 readers
1 users here now

Talk about the Bash Shell and Bash scripting

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 16 points 3 days ago* (last edited 3 days ago) (1 children)

Bottom left example will leave you with a lot pictures ending on ".png.jpg".

[–] zarkanian 2 points 3 days ago (1 children)
[–] [email protected] 9 points 3 days ago* (last edited 3 days ago) (1 children)

convert $i ${i%.*}.jpg

NB: I'm no guru - I just googled "remove file extension in bash".

[–] [email protected] 4 points 2 days ago

Should also definitely be quoting both arguments