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

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

Re: [shell-script] saida padrao


From: Daniel Duclos
Subject: Re: [shell-script] saida padrao
Date: Fri, 9 Jan 2004 18:53:36 -0200 (BRST)

On Fri, 9 Jan 2004, groo wrote:

> boa tarde
>
> quando um programa eh executado sem problemas ele retorna 0 ou 1?

        0
> como eu verifico isso com o if?

danielduclos:~$ if [ "$?" = "0" ]; then echo ok; else echo fudeu; fi
ok
danielduclos:~S



        - daniduc

Daniel Lobato Duclos -  http://www.cybershark.net
GPG Key fingerprint = A21B 40DF 4B8D 3CE6 9284  E764 4DF0 144C 509F 080F
---------------------------------------------------------------------------
"   For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled." R. P. Feynman
http://science.ksc.nasa.gov/shuttle/missions/51-l/docs/rogers-commission/Appendix-F.txt


reply via email to

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