Initial add of defaria.com
[clearscm.git] / defaria.com / Computers / code / adm / bin / display_path
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         display_path
5 # Description:  Displays the components in PATH
6 # Author:       Andrew@DeFaria.com
7 # Language:     Korn Shell
8 #
9 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved.
10 #
11 ################################################################################
12 # Set me to command name
13 me=$(basename $0)
14
15 # Set adm_base
16 adm_base=${adm_base:-//sonscentral/Corporate/Software/adm}
17
18 # Set adm_fpath
19 adm_fpath=${adm_fpath:-$adm_base/functions}
20
21 # Source functions
22 . $adm_fpath/common
23
24 declare -i i=0
25
26 for path_component in $(echo $PATH | tr ":" "\n"); do
27   let i=i+1
28   if [ $i -eq 1 ]; then
29     display "PATH consists of the following components:\n"
30   fi
31   display "\t$i) $path_component"
32 done | $PAGER