a part of replacer MUST use SED

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    there are 3 files as input and you have to convert them to each other by using SED

Temp1file will be converted to Temp2 as given sample outputs after you use your sed command
then
Temp2 will be converted to Temp3 after you use as given sample output after your use sed command.

  1. Relevant commands, code, scripts, algorithms:
    Temp1 sample
@
1
@
2
@
3
This eBook is f
@@:or t
he use of anyone anywhere at no cost and with
@
4
@
5
re-use it under the terms 
@@:of t
he Project Gutenberg License included
@
6
@
7
@
8
@
9
@
10
@
11
@
12
@
13
@
14
@
15
@
16

Temp2 sample

@1
@2
@3
@
:or t
@4
@5
@
:of t
@6
@7
@8
@9
@10
@11
@12
@13
@14
@15
@16
@17
@18
@19
@20
@21
@22
@23
@24
@25
@26
@27
@28
@29
@30
@31
@32
@33
@34
@35
@36
@37
@38
@39
@40
@41
@42
@
:on t
@43
@
:or t
@44
@45
@46
@47
@48
@
:or t

temp3 sample

1
2
3
:or t
4
5
:of t
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:on t
  1. The attempts at a solution (include all code and scripts):
    first one is something like cat Temp1 | sed -n '/@/ {N;s......

  2. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    Bilkent University, Ankara/Turkey, Bahattin Hoca , system programming

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

Can you give a plain language pseudo code definition of what changes, file1 to file2 and file2 to file3?