Hi,
I am beginner. have almost one text file which contains 6000 lines. every line is in different format.so need to rearrange in single format.
Ex: .thde.adgtmk.802ati
thde.kghijk..567ati
..thde.kghijk..458ati
thde.ertyui.456.567.789ati
thde.awse.dati
Rules:
1.no line should start with '.' or '..'
2.if line contains more 11characters then need add one space after that(if 12th character is '.' then need replace with one space other wise add one space)
3.if 12th and 13th both are '.' then replace with one space.
4.if line contains like - thde.ertyui.456.567.789ati
then need to replace like
thde.ertyui 456ati
thde.ertyui 567ati
thde.ertyui 789ati
5.if line contains - thde.awse.dati
then thde.awse dati
every line should contain 11character then either '.' or '..'
if line have 4 characters then '.' then 5 characters so totally 10 characters only have then 11 character has to insert as space.
so finally output should appear like
thde.adgtmk 802ati
thde.kghijk 567ati
thde.kghijk 458ati
thde.ertyui 456ati
thde.ertyui 567ati
thde.ertyui 789ati
thde.awse dati
It would be great if i get the solution ASAP 
Thanks a lot...
---------- Post updated at 08:17 PM ---------- Previous update was at 05:08 PM ----------
I am using AIX/unix.....if it could done with AWK and SED .....really it would be great.... 