I see that the sed is doing its job in regarding of adding the zero (in your
results), maybe the awk, since I cannot see the year field, try without the
sed, only the awk and post the output, please.
On 7/16/08, Khamis Siksek <[EMAIL PROTECTED]> wrote:
>
> The output on my machine
>
> 2011/08/31
> 2020/01/07
> 2013/01/31
> 2010/11/04
> 2045/10/03
> 2145/02/28
> 2010/04/30
> 2012/03/17
> 2009/08/31
> 2012/06/30
> 2010/07/31
> 2011/08/31
> 2020/01/26
> 2013/01/31
> 2010/11/17
> 2012/10/31
>
> GNU sed version 4.1.4
>
> On 7/16/08, Jad madi <[EMAIL PROTECTED]> wrote:
>>
>>
>> ya ma3alim this does not work
>>
>>
>> [EMAIL PROTECTED]:~/fi/makan/ma$ head foo.txt
>> 4/30/2010
>> 3/17/2012
>> 8/31/2009
>> 6/30/2012
>> 7/31/2010
>> 8/31/2011
>> 1/26/2020
>> 1/31/2013
>> 11/17/2010
>> 10/31/2012
>> [EMAIL PROTECTED]:~/fi/makan/ma$ head foo.txt | awk -F'/' '{OFS="/"; print
>>
>> $3,$1,$2}' | sed s'/\/\([[:digit:]]\)\//\/0\1\//g' | sed
>> s'/\/\([[:digit:]]\)$/\/0\1/g'
>>
>> /04/30
>> /03/17
>> /08/31
>> /06/30
>> /07/31
>> /08/31
>> /01/26
>> /01/31
>> /11/17
>> /10/31
>>
>>
>> >>
>>
>
>
> --
>
> Khamis Siksek
> http://saksoook.blogspot.com
>
--
Khamis Siksek
http://saksoook.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
### Jordan Linux Users Group ###
http://Jolug.org/
http://groups.google.com/group/Jolug
### Ubuntu Jordan LoCo Team ###
https://wiki.ubuntu.com/JordanTeam
http://lists.ubuntu.com/ubuntu-jo
### Ojuba Linux ###
http://ojuba.org/
### Jordan PHP ###
http://groups.google.com/group/JoPHP
-~----------~----~----~----~------~----~------~--~---