Useful sed commands
Delete nth line inplace
sed -i .tmp '<n>d' <filename>
Get the nth line
sed '<n>q;d' <filename>
Delete the first 10 lines of a file
sed '1,10d'
Delete lines matching pattern
sed '/pattern/d'
sed -i .tmp '<n>d' <filename>
sed '<n>q;d' <filename>
sed '1,10d'
sed '/pattern/d'