for f in /Users/nick/Desktop/*.jpg; do echo $f; done
Edit
Actually, I think that this comment by @KyleBurton is very clever and should be taken into account since it explains why a result like OP’s could be observed.
for f in /Users/nick/Desktop/*.jpg; do echo $f; done
Edit
Actually, I think that this comment by @KyleBurton is very clever and should be taken into account since it explains why a result like OP’s could be observed.