how to get the name of the .. folder in shell code example Example: get list of directories bash for d in */ ; do echo "$d" done