bash4$ with-temp-dir
with-temp-dir: entering directory `/tmp/with-temp-dir.Y8IIFS'
This directory will be deleted when you exit.
bash4$ touch 1.jpg 2.png 3.png
bash4$ shopt -s nullglob
bash4$ gifs=(*.gif) jpgs=(*.jpg) pngs=(*.png)
bash4$ echo "${#gifs[@]}" "${#jpgs[@]}" "${#pngs[@]}"
0 1 2
bash4$ ((${#gifs[@]})) || echo fail
fail
bash4$ ((${#jpgs[@]})) || echo fail
bash4$ ((${#pngs[@]})) || echo fail
bash4$
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main