2)
1 Solution:
You will need to append so ">>" will be used
and the commands head and tail, and see how by using man
And you would have to write a test to accept the line number for argument...
Remark:
Since your lines are numbered, what will to with them?...( out of sequence...)
3)
Share your solution with your peers, and ask them to give their opinion
(I believe here will you see then other solutions with perhaps some explained algorithms...) or the issue you have