#**************************************************************************** # C shell script to show the directory tree in HP-UX 10.x. # Cut the two files apart where shown below. Call the first file tree and # the second one tree.aux. Make sure that each starts with the /bin/csh line. # chmod 700 tree tree.aux # to be sure that the scripts have execute permission. #**************************************************************************** #! /bin/csh -f # # Filename: tree # # Programmer: Br. David Carlson # # Date: February 7, 1994 # # Description: C shell scripts to show the directory tree. These scripts are # placed in the public domain and are provided "as is" without warranty of any # kind. No restrictions are placed on the use, copying, or modification of # these scripts. # # Files used: tree.aux (auxiliary shell script) # set tree_tmp=`ls -lA | grep ^d | grep -v ^t | cut -c 58-` set dir_count=0 setenv I_COUNT 0 while ($dir_count < $#tree_tmp) @ dir_count++ echo $tree_tmp[$dir_count] cd $tree_tmp[$dir_count] tree.aux cd .. end unset tree_tmp dir_count unsetenv I_COUNT #********************************************************************** # Cut the two files apart here. Call the first file tree and the second # one tree.aux. Make sure that each starts with the /bin/csh line. Use # chmod 700 tree tree.aux # to be sure that the scripts have execute permission. #********************************************************************** #! /bin/csh # # Filename: tree.aux # # Programmer: Br. David Carlson # # Date: February 7, 1994 # # Description: Auxiliary C shell script for use by the tree shell script. # As with the tree script, this is placed in the public domain. # set tree_tmp=`ls -lA | grep ^d | grep -v ^t | cut -c 58-` set dir_count=0 set i_hold=$I_COUNT @ i_count = $i_hold + 1 setenv I_COUNT $i_count while ($dir_count < $#tree_tmp) @ dir_count++ repeat $I_COUNT echo -n " " echo $tree_tmp[$dir_count] cd $tree_tmp[$dir_count] tree.aux cd .. end setenv I_COUNT $i_hold unset tree_tmp i_hold dir_count i_count