[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Retorno
From: |
Thobias Salazar Trevisan |
Subject: |
Re: [shell-script] Retorno |
Date: |
Wed, 9 Jul 2003 09:52:57 -0300 (BRT) |
ae rettore,
On Wed, 9 Jul 2003, rettore wrote:
> como faço para retornar um erro para o sistema atravez de um shell
> script ???
exit número.
> o return 1 não funciona !!!!!!!
o return tu usa em funções.
$ cat x
#!/bin/bash
X(){
return 1
}
X
echo SAIR $?
$ ./x
SAIR 1
#####################
$ cat x2
#!/bin/bash
exit 1
$ ./x2
$ echo $?
1
falow
thobias
-------
echo 9446046325380026818553633794429812592304650P | dc
-------
http://www.lcp.coppe.ufrj.br/~thobias
____________________________
|
| Against - HTML Mail
| Against - MS ATTACHMENTS
|
----------------------------