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

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

Re: [shell-script] resultado do find...


From: Gentil de Bortoli Júnior
Subject: Re: [shell-script] resultado do find...
Date: Thu, 10 Feb 2005 12:02:35 -0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Tia, não entendi seu problema muito bem, acho...

Qual é o propósito de incluir um string (no caso, "teste"), na frente do nome do arquivo?

Bom, vai uma idéia, sem testar:

for arquivo in `find`; do
    novo=${arquivo/\//\/teste\/}
    echo ${novo}
    for linha in `cat ${novo}`; do
        echo $linha
    done
done

[]s
Gentil.

Tia wrote:
Ou seja, algo assim:

tia@terra:~/shell$ find
.
./velha.sh
./velha.zip
./sed
./sed/CONTEST

Desse resultado, alteraria para:

tia@terra:~/shell$ find
./teste/
./teste/velha.sh
./teste/velha.zip
./teste/sed
./teste/sed/CONTEST
E ainda teria que ler o conteudo por exemplo do "velha.sh" ...

Alguem tem alguma idéia??


reply via email to

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