Updated SC2144 (markdown)

Eisuke Kawashima
2025-07-29 10:58:56 +09:00
parent aa6b230e7f
commit f76882ef60

@@ -45,15 +45,13 @@ for f in /path/to/your/files*; do
done
```
### Exceptions
If you are sure there will only ever be exactly 0 or 1 matches -- and `nullglob` is not enabled -- then the test happens to work.
You may still want to consider making this assumption explicit and failing fast if it's ever violated:
```
```bash
files=( dir/file* )
[ "${#files[@]}" -ge 2 ] && exit 1
if [ -e "${files[0]}" ]