sorting with excluding header and trailer
Posted: Thu Jun 09, 2016 3:42 pm
Suppose if this is my input file
I want to sort this input file excluding the HEADER and TRAILER but the HEADER and TRAILER should be in the output of the sorted file.
i.e this should be the output
Is there a way to do it?
HEADER
1111AAAA
3333CCCC
2222BBBB
TRAILER
1111AAAA
3333CCCC
2222BBBB
TRAILER
I want to sort this input file excluding the HEADER and TRAILER but the HEADER and TRAILER should be in the output of the sorted file.
i.e this should be the output
HEADER
1111AAAA
2222BBBB
3333CCCC
TRAILER
1111AAAA
2222BBBB
3333CCCC
TRAILER
Is there a way to do it?