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

> In case there are no jpg files in the working directory, Bash will put the pattern itself (*.jpg) into the $x variable. You need to explicitly check that the file in the variable actually exists before working on it.

Indeed that's one thing Elvish has better defaults that I forgot to mention in https://elv.sh/learn/scripting-case-studies.html#jpg-to-png...., and now I've added that, thanks :)



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

Search: