• + 2 comments

    I found a simple solution using the sed command but I don't know if I can use it to solve this problem. Other approaches to find a solution consist in use both commands, head and tail, passing the output of the first command as input of the second command.