6 # Life Insurance Data Processing
10 # Print directory tree structure as follows:
33 # Conversion to bash v2 syntax done by Chet Ramey
34 # - removed command substitutions calling `basename'
45 local object
# Local variable
49 for object
in $PWD/.??
* $PWD/*
51 if [ -d $object ]; # It is a directory
53 echo "${indent}|___${object##*/}/"
54 indent
="${indent}! " # Add to indentation
57 ExpandDirectory
$object
59 indent
=${indent%????} # Remove from indentation
60 elif [ -e $object ]; then
61 if (( ShowAll
== 1 ));
63 echo "${indent}|___${object##*/}"
72 echo -e "Usage: $ProgramName [-h] [-f] [-d] [path] "
73 echo -e "\t-h ... display this help message."
74 echo -e "\t-f path ... shows all files and directories below path (default)."
75 echo -e "\t-d path ... shows all directories only below path."
78 while getopts "fd" opt
87 shift $
(( $OPTIND - 1 ))
91 if [ ! -d "$Path" ]; then
92 echo "$0: error: specified path is not a directory." >&2