this post was submitted on 01 Dec 2024
414 points (99.1% liked)

Bash

791 readers
3 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
[–] waigl 16 points 2 months ago* (last edited 2 months ago) (3 children)

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

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

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

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

[–] qqq 4 points 2 months ago

Should also definitely be quoting both arguments