Suppose I have a bash for-loop
for name in *; do
printf $(some stats about $name)
done
Now I would like to also print the same stats about the current folder itself, in other word, something like
for name in (* and .); do # NOT VALID BASH COMMAND
printf $(some stats about $name)
done
My question is what should I do for the "pseudo-command" (* and .)?
I know I can simply do printf $(some stats about .) after the for-loop, but I would like to know whether there is a more generic way of doing so. (Just assume $(some stats about $name) is long and I would like to avoid defining another function if possible). Thanks!