2012. 7. 12. 17:27

#!/bin/bash
DIR="Hobby"
A=`ls -R $DIR | grep : | tr -d :`

for i in `echo $A`
do
    B=`ls -l $i | grep ^- | awk '{print $9}'`
    if [ "$B" != "" ]; then
        echo "[ ${i##*/} ]"
        for j in `echo $B`
        do
            echo "  $j"
        done
        echo ""
    fi
done

Posted by 몰라욧