[FUG-BR] Variaveis de Shell

Renato Botelho rbgarga em gmail.com
Segunda Dezembro 29 08:20:02 BRST 2008


2008/12/29 Anderson Watanabe <wataankaol at gmail.com>:
> Pessoal,
>
>
>
> Estou tendo dificuldade de compreender e fazer funcionar as variaveis
> abaixo.
>
> Podem me ajudar, como fazer com que no FreeBSD eu possa ter o mesmo
> resultado???
>
>
> Segue....
>
> No linux:
>
> DATA=$(date +%Y%m%d)
> YESTERDAY=$(date --date "1 day ago" +%Y%m%d)
> #
> MONTH=$(date +%Y%m)
> LASTMONTH=$(date --date "1 month ago" +%b)
> #
> #
>
>
> No Freebsd, como faco?


garga at botelhor:~> date
Mon Dec 29 08:19:22 BRST 2008
garga at botelhor:~> date +%Y%m%d
20081229
garga at botelhor:~> date -v-1d
Sun Dec 28 08:19:30 BRST 2008
garga at botelhor:~> date +%Y%m
200812
garga at botelhor:~> date -v-1m
Sat Nov 29 08:19:58 BRST 2008


-- 
Renato Botelho


Mais detalhes sobre a lista de discussão freebsd