Help Needed in arrangind data!

Dear All,

Please view the below mentioned text and help me in arranging data in format like

DATE TIME Value (2nd-Feild)

e.g.

20-JUN-209 00:25:38 69.00
...........
...........
...........
...........

and so on till the file end.

20-JUN-2009 00:25:38, 195.20,  69.00,540,159,699,21,2020-JUN-2009 00:40:38, 197.40,  62.00,502,146,649,21,20
20-JUN-2009 00:55:39, 180.81,  73.00,482,138,620,21,2020-JUN-2009 01:10:39, 209.59,  88.00,451,128,580,21,2020-JUN-2009 01:25:39, 18
9.98,  69.00,411,117,529,21,2020-JUN-2009 01:40:40, 173.11,  69.00,376,106,483,21,2120-JUN-2009 01:55:40, 163.42,  69.00,347,106,454
,21,2020-JUN-2009 02:10:41, 159.32,  69.00,321,100,421,21,2020-JUN-2009 02:25:41, 154.32,  69.00,285,88,374,21,2020-JUN-2009 02:40:4
1, 142.03,  69.00,245,76,322,21,2120-JUN-2009 02:55:41, 137.63,  69.00,204,68,273,21,2120-JUN-2009 03:10:42, 129.13,  69.00,172,62,2
34,21,2120-JUN-2009 03:25:42, 108.44,  69.00,146,54,201,21,2120-JUN-2009 03:40:42, 115.74,  69.00,120,48,168,21,2120-JUN-2009 03:55:
42, 102.45,  69.00,99,43,142,21,2120-JUN-2009 04:10:43,  90.85,  69.00,87,41,128,21,2120-JUN-2009 04:25:43,  83.75,  69.00,69,34,104

Thankz in advance:b:

where's your code?

thts the output file being generated by script and i need to arrange data as mentioned previoulsy.

please advice any suitable coomand or code to sort this data as desired:b:

what have you tried?

well, there is an automated file generated by the system in a particular directory,

later i ftp through an automated script, after getting this file, the sample output i get was attached in my first post.

Now i want to sort this data as mentoned earlier.

This is bascially an script which is getting system SAR.

Hope this might help u.......:b:

you don't seem to get my message. What have you tried so far to solve your problem? where is your script?? if you don't have a script, start writing one!. you are introduced to shell scripting from previous posts...so i would expect you already read up on basic shell scripting.

ok here is the script

#!/bin/sh
DATE=`date +%Y%m%d`
ftp -inv 192.168.0.130 <<END
quote user abcd
quote pass qwer
   bin
cd who_me0:[RECORDS]
lcd /tmp/SAR
prompt
mget filename
END

so?? that does not relate to the problem you are trying to solve. you want to arrange data in a file, so what does it have to do with the ftp part? where is the code to arrange data that you have tried?

well thats anautomated script comes with this package, system is generating this file daily.

Wel right now i have no concerned how system is generating this file.

once system generates this file, i will fetch the file through ftp script i mentioned earlier.

but after fetching it, I get RAW data all in mess. So i want to display it as mentioned earlier.

Now can anyone help me out.

Okay, you get "RAW data all in mess". You want to display it as mentioned earlier.

(a) If you haven't written a script that converts raw data to your format, then try to write one first.

(b) If you have written such a script, then post it here.

tyler_durden

ok i tried using "sort" command

i even tried "awk" and "sed" but it didnt came out, and i knw awk and sed will do this

here's wat i tried

awk '/$4 {print $NF}' filename | more

i later tried paste command

paste -d '|' filename | more (so that once file is replaced with pipe against "," and spaces it can be handled easily)

then i tried using sort command

sort -u filename | more

even sed didnt help me out

sed 's/,/|/ filename | more (i m not sure about this clause, here i tried to replace "," with pipe "|")

i might be using wrong format, so need help.