delete a line starting with sed
# Delete all lines starting with '#'
$ sed -i '/^#/d' filepath
delete a line starting with sed
# Delete all lines starting with '#'
$ sed -i '/^#/d' filepath
delete line in sed
# -i here update the file, try with and without -i,
sed -i -e '/yourpattern/,$d' file # delete everyhing afer the pattern
sed -i -e "/your_pattern/,+2 d" file # 2 lines after the pattern
sed -i -e "5,5d" file # remove 5th line
sed '10,$d' pes.com # delete everything after 10th line
sed '7,36!d' tmp.com > tmp_coord # specific lines to a file
sed -i -e '29,36d' pes.com delete specific lines
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us