The output of a command is:
name money expiry_date
Jack 300 Nov 20 13:12 2005
.
.
.
Frank 128 Aug 11 12:09 2005
I will take the above to generate something like below and put it in a file:
(ACTION=CREATE;USER=JACK;LANGUAGE=1;MONEY=300;EXPIRY_DATE= 20 11 2005 1312;SEQUENCE=900
Problem is to convert Nov 20 13:12 2005 to 20 11 2005 1212.
What i did is the following:
<output of the command shown above> | awk '{ printf "(ACTION=CREATE;USER=%s;LANGUAGE=1;MONEY=%s;EXPIRY_DATE= %s %s %s %s%s;SEQUENCE=900
",$1,$2,$4,$3,$6,substr($5,0,2),substr($5,3,2)}' >> file
the output is great but i have only "Nov" instead of 11
to i tried to use the "tr"command of <file> but i am not succeeding... how can i change this????
Please consider this as very urgent.