sed -i '' '/pattern to match/d' ./infile
grep -v "pattern" file > temp && mv temp file
> sed '2,4d' file