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

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

Re: duvida em script basico


From: Timeu F. Oliveira
Subject: Re: duvida em script basico
Date: Thu, 22 Mar 2007 11:45:26 -0000
User-agent: eGroups-EW/0.82

valeu... erro de sintaxe neh... funcionou... xD
--- Em address@hidden, "Tiago Barcellos Peczenyj"
<tiago.peczenyj@...> escreveu
>
> Timeu,
> 
> faça o teste assim:
> 
> test -d "$ARQUIVO" && echo "diretorio"
> 
> On 3/21/07, Timeu F. Oliveira <heathcliff_lnx@...> wrote:
> >
> >   olá pessoas... sou novo na lista e estou tentando aprender o shell
> > script... bom... estou tentando fazer um script que identifique se o
> > arquivo ou diretorio existe... em caso positivo escrever se eh arquivo
> > ou diretorio caso nao exista escrever que não existe... bom nisso q
> > postarei abaixo era pra ser a parte de identificar... mas n tah
> > funcionando sendo arquivo ou diretorio ele diz q eh diretorio...
> >
> > #!/bin/bash
> > echo "digite o arquivo:"
> > read ARQUIVO
> > test $ARQUIVO!=-d && echo "diretorio"
> > exit
> > test $ARQUIVO=-f && echo "arquivo"
> >
> > ideias?
> >
> >  
> >
> 
> 
> 
> -- 
> Tiago B Peczenyj
> Linux User #405772
> 
> # cd /pub
> # more beer
> 
> 
> [As partes desta mensagem que não continham texto foram removidas]
>




reply via email to

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