10 echo these lines should be the same
12 echo ~0 ${DIRSTACK[0]}
13 echo these lines should be the same
15 echo ~1 ${DIRSTACK[1]}
16 echo these lines should be the same
18 echo ~2 ${DIRSTACK[2]}
20 NDIRS=$(( ${#DIRSTACK[@]} - 1 ))
22 echo these lines should be the same
24 echo ~-2 ${DIRSTACK[NDIRS-2]}
26 echo these lines should be the same
28 echo ~-1 ${DIRSTACK[NDIRS-1]}
31 echo these lines should be the same
33 echo ~-0 ${DIRSTACK[NDIRS]}