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

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

Re: [shell-script] Script simples


From: Fabricio
Subject: Re: [shell-script] Script simples
Date: Tue, 06 Sep 2005 11:59:22 -0300
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

outra solução

[root@localhost ~]# cat teste
#!/bin/bash

for i in `seq 1 $#` ; do
eval echo \$${i} >> file
done
[root@localhost ~]# ./teste Maria Pedro Bariloche Vampeta
[root@localhost ~]# cat file
Maria
Pedro
Bariloche
Vampeta


\\-----------------------------------------------------------

ele faz um for de 1 ateh o numero de parametros passado e vai imprimindo parametro por parametro




reply via email to

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