how to delete all lines in a file in vi editor code example
Example 1: vim delete line
# Basic syntax:
dd
# Note, add a number in from of dd to delete that many lines, e.g.:
5dd # Delete the next 5 lines
Example 2: delete lines text file linux
sed -i '' '/pattern to match/d' ./infile