How to remove header and footer records of a flat file using UNIX shell script?

Use the below sed command to delete the Header record.
i – Replace the original file
1d – delete the first record in the file

#To remove the first record in the original file
sed -i '1d' FF_EMP.txt


#To create a new file with header removed
sed '1d' FF_EMP.txt > FF_EMP_NEW.txt 

Use the below sed command to delete the footer record.
i – Replace the original file
$d – delete the last record in the file

#To remove the last record in the original file
sed -i '$d' FF_EMP.txt


#To create a new file with trailer removed
sed '$d' FF_EMP.txt > FF_EMP_NEW.txt 

Use the below sed command to delete both the header & footer record

#To remove the header & footer
sed -i '1d;$d' FF_EMP.txt


#To create a new file with header & trailer removed
sed '1d;$d' FF_EMP.txt > FF_EMP_NEW.txt