This script analyzes directory structures and generates arrays or commands to recreate the structure including permissions and ownership. It uses the find command to retrieve directory information, then processes the output to extract attributes like owner, group, and permissions. It can generate shell code defining arrays of the attributes, or commands to recreate the directories and set permissions. The script works in KornShell, ZShell or Bash.