Ops...
Acho que me confundi...
$0 se não me engano retorna o nome do script que está sendo executado.
Alguem confirme por favor.
$# é que retorna o número de argumentos. Teste este exemplo (e veja também
o $* que legal):
#!/bin/sh
# Illustrates using command-line arguments
# Execute with
# sh args1.sh On the Waterfront
echo "First command-line argument is: $1"
echo "Third argument is: $3"
echo "Number of arguments is: $#"
echo "The entire list of arguments is: $*"
Pablo Henrique
<[EMAIL PROTECTED] Para: debian-list
<[email protected]>
com.br> cc:
Assunto: Re: Passar paramentros
em arquivo de shell script tem como?
13/05/2003 12:29
Então não entendi muito pena não poder testar agora
mais você esta me dizendo que o $0 e igual ao argv[0]
do c? Caso seja com consigo o argc?
[]s,
Pablo Henrique
_______________________________________________________________________
Yahoo! Mail
O melhor e-mail gratuito da internet: 6MB de espaço, antivírus, acesso
POP3, filtro contra spam.
http://br.mail.yahoo.com/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]