shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alguem me ajuda nete shell por favor


From: discucao
Subject: alguem me ajuda nete shell por favor
Date: Wed, 11 Sep 2002 14:50:35 -0000
User-agent: eGroups-EW/0.82

#!/bin/bash
if [ $# -ne 1 ]
then
        echo "Parametro Incorreto"
        echo "arvore <diretorio>"
        exit
fi

Dir()
{
        
cd $1 >> /dev/null #este $1 nao esta recebendo o conteudo passado como
parametro alguem pode me dizer porque?
echo $1
if [ $? -ne 0 ]
then
        echo "Diretorio Inexistente"
        echo "Tente novamente"
        Dir
        else
        Select
fi
}
Select()
{
        for teste in `ls -lR | rgrep $arq '^./' | cut -f1 -d":"`
        do
                qtarq=`ls $teste | wc -l`
                echo "$teste tem $qtarq arquivos"
                sleep 2
        done
}
Dir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]