[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Arquivo gerado com a data de hoje
From: |
Daniel Duclos |
Subject: |
Re: [shell-script] Arquivo gerado com a data de hoje |
Date: |
Wed, 30 Jan 2002 12:36:59 -0200 (BRST) |
On Wed, 30 Jan 2002, Daniel Duclos wrote:
> On Wed, 30 Jan 2002, SERVIDOR LINUX SP wrote:
>
> > Caros,
> >
> > Como posso criar um arquivo com a data de hoje:
> >
> > #!/bin/bash
> > data = `date +%d'_'%m'_'%Y`
> > /bin/ping -c10 10.4.1.1 > pinghj.txt
> > mv pinghj.txt $data
>
> #!/bin/bash
> IP=10.4.1.1
> data="`date +%d`_`date+%m`_`date+%Y`"
> /bin/ping -c10 $IP > $data
Opas, me auto corrigindo:
#!/bin/bash
IP=10.4.1.1
data="`date +%d`_`date +%m`_`date +%Y`"
/bin/ping -c10 $IP > $data
Agora sim =)
Daniel Lobato Duclos - address@hidden - http://www.cybershark.net
GPG Key fingerprint = A21B 40DF 4B8D 3CE6 9284 E764 4DF0 144C 509F 080F
---------------------------------------------------------------------------
Punk ain't no religious cult
Punk means thinking for yourself
You ain't hardcore cos you spike your hair
When a jock still lives inside your head
(Dead Kennedys - Nazi Punk Fuck Off)