I have an example [file] that I want to capture lines 3-6 and lines 11-13, then sort with a single line and save it as 3_6-11_13. These are the commands that I have used so far, but I did not get the desired result:
sed -n '/3/,/6/p'/11/,/13/p file_1 > file_2 | sort -k 2 > file_2 & sed -n 3,6,11,13p file_1 > file_2 | sort -k 2 file_2.
Is there a better way to cut this. I was thinking about using awk but still stayed with sed.
source share