Here's a freebie...

Bambi.
=====================
#!/bin/ksh
LEVEL=1
INCREMENT=FALSE
ls -lR|grep -v ^total|while read i
do

    echo $i|grep ^d >/dev/null 2>/dev/null
    if [ $? -eq 0 ] ;
    then
        continue
    fi
    FILE=`echo $i|awk '{print $NF}'`

    echo $i|grep "\/" >/dev/null 2>/dev/null
    if [ $? -eq 0 ] ;
    then
        LEVEL=`expr \`echo $i|awk -F/ '{print NF}'\` - 1`
        FILE=`echo $i|awk -F/ '{print "/" $NF}'|sed "s/://"`
        INCREMENT=TRUE
    fi

    CTR=1
    while [ $CTR -lt $LEVEL ] ;
    do
        echo "  \c"
        let CTR=CTR+1
    done
    echo $FILE
    if [ $INCREMENT = "TRUE" ] ;
    then
        let LEVEL=LEVEL+1
        INCREMENT=FALSE
    fi
done|pg
======================

-----Original Message-----
Sent: Tuesday, December 23, 2003 10:49 AM
To: Multiple recipients of list ORACLE-L


Hi, listers.
As documentation for a project, I would like to
display some unix directories in hierarchical format
and add the output to the documentation set.
(Solaris 9)

Either flowchart-like or explorer-like will do.  Sorta
like what is shown below.  Does anyone know of a
freebie tool that will do this?  (Or is this some
fancy ls command I'm missing?)

Thanks for any help.
Barb


/dna
  /orasrv
     /1.4
        /scripts
     /1.7
        /scripts
  /logs


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Barbara Baker
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Bellow, Bambi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to