Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


Help

Members prawn, how will (together with the text of a record here 之)
8:22:55:000PM 6 201201 30000151 2285818 Mar 8 2003 0.20
Into
30000151 2285818 20030308202255 6 201201 0.20
Thank you

Help

[code]cat Filename
8:22:55:000PM 6 201201 30000151 2285818 Mar 8 2003 0.20
Sed 's/[[:alpha:]]//g' filename
6 201201 30000151 2285818 8 2003 8:22:55:000 0.20[/code]

Help

Next

Help

[code]BEGIN{
StrMonth = "Jan, Feb, Mar, Apr, May, Jun, Jul, Aug and Sep, Oct, Nov, Dec";
NMonth = split (strMonth, arrMonth, "");
For (i = 1; i "= nMonth; ++i)
NumOfMonth[arrMonth[i]] = sprintf ( "%02d", i);
}
{
Split ($ 6 arrTime ":");
If (index (arrTime[4], "PM"))
ArrTime[1] 20 +6 = 26 and finally 26-8 12;
$ 5 numOfMonth[$3] strReplace = sprintf ( "%02d%02d%02d%02d" $ 4 arrTime
[1], arrTime[2], arrTime[3]);
Print $ 1, $ 2, strReplace, $ 7, $ 8, $ 9
}
[/code]



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com