Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why use sed here?

    find images -name "*.jpg" | while read -r jpg; do
        convert -geometry 200x "$jpg" "${jpg%.jpg}_thumb.jpg"
    done
This correctly handles spaces in file names and uses built in shell string replacement.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: