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

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

Re: [shell-script] Meses de português para inglês


From: André Alexandre Gaio
Subject: Re: [shell-script] Meses de português para inglês
Date: Mon, 14 Feb 2005 21:16:58 +0000

Em Seg, 2005-02-14 às 20:55, Eriberto escreveu:
> Pessoal,
> 
> Tem um jeito melhor (mais compacto) de fazer isso?
> 
> #!/bin/bash
> data1=`date '+%b %e'|sed 's/Fev/Feb/'|sed 's/Abr/Apr/'|sed 
> 's/Ago/Aug/'sed 's/Set/Sep/'|sed 's/Out/Oct/'|sed 's/Dez/Dec/'`
> echo $data1

Apenas encurtando um pouco e deixando um pouco mais rápido. :-)

#!/bin/bash
data1=`date '+%b %e'|sed
's/Fev/Feb/;s/Abr/Apr/;s/Ago/Aug/;s/Set/Sep/;s/Out/Oct/;s/Dez/Dec/'`
echo $data1


-- 
André Alexandre Gaio
Consultor especialista
Linwork Informática S/C Ltda
Soluções Inteligentes!
aagaio (at) linwork.com.br
http://www.linwork.com.br
GnuPG ID: 0x8246313A pgp.mit.edu
Key fingerprint:D12E 3F87 5F0E A48F 9351 40DC 1003 42DA 8246 313A

Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

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