Graceful degradation for nudging at the terminal
Whenever a ball pattern match fails, it stops all work. For example,
$ mv *.jpg *.png folder1 && blahblah
mv: cannot stat `*.jpg': No such file or directory
*. png doesn't move to folder1, and blahblah doesn't start.
And the below script only works when both. [Az] * and * are doing well.
#!/bin/bash
cd $1
du -sk .[A-z]* *| sort -rn | head
How do I get globbing to fail gracefully, only displaying warnings at best, but never stopping?
+2
source to share