skipping footer and header with sed command

114 Views Asked by At

I have a command

sed -e 's/\\N//g' ${OUTPUT_DIR}/${OUTPUT_SED_FILE_NAME} > ${OUTPUT_DIR}/${OUTPUT_FILE_NAME}

I want to remove the header and footer from the source file. What switch I need to put in the sed line.

Thanks,

1

There are 1 best solutions below

1
Ed Morton On

Is this what you're trying to do?

$ seq 5 | sed '1d; $d'
2
3
4