sed изтриване на ред, съдържащ
sed '/pattern to match/d' ./infile
изтрийте реда, който започва с sed
# Delete all lines starting with '#'
$ sed -i '/^#/d' filepath
изтриване на редове в текстов файл linux
sed -i '' '/pattern to match/d' ./infile
баш как да премахнете определен ред от файл
# Basic syntax:
sed 'line#d' input_file
# Where line# is the line you want to delete from the input_file
# Example usage:
input_file contains:
this is
my favorite
line
sed '2d' input_file
--> this is
--> line
линия отстраняване на sed
$ sed 's|http://||' <<EOL
http://url1.com
http://url2.com
http://url3.com
EOL