I have 1 input file as
Sno Subject roll-Number Name
1 English 100 ABC
2 Maths 100 ABC
3 Science 100 ABC
4 Computer 100 ABC
5 English 200 DEF
6 English 300 GHI
7 Maths 300 GHI
8 Science 400 JKL
9 Computer 500 MNO
10 English 500 MNO
1 English 100 ABC
2 Maths 100 ABC
3 Science 100 ABC
4 Computer 100 ABC
5 English 200 DEF
6 English 300 GHI
7 Maths 300 GHI
8 Science 400 JKL
9 Computer 500 MNO
10 English 500 MNO
sorted roll-number wise
now i just to print data as
Sno Subject roll-Number Name Privious Roll-number
1 English 100 ABC ___(Space)
2 Maths 100 ABC 100
3 Science 100 ABC 100
4 Computer 100 ABC 100
5 English 200 DEF 100
6 English 300 GHI 200
7 Maths 300 GHI 300
8 Science 400 JKL 300
9 Computer 500 MNO 400
10 English 500 MNO 500
1 English 100 ABC ___(Space)
2 Maths 100 ABC 100
3 Science 100 ABC 100
4 Computer 100 ABC 100
5 English 200 DEF 100
6 English 300 GHI 200
7 Maths 300 GHI 300
8 Science 400 JKL 300
9 Computer 500 MNO 400
10 English 500 MNO 500
how I can do this using DFSort.
Code'd - de-mangling not attempted