I'm trying to sort and edit a long .txt file and I would like to delete all instances of the following from any line containing it.
[getpwnam_ext]
I'm trying to sort and edit a long .txt file and I would like to delete all instances of the following from any line containing it.
[getpwnam_ext]
to remove just the text you mentioned, use:
sed -i 's/\[getpwnam_ext\]//g' filename
to remove the whole line that contains that text, use:
sed -i '/\[getpwnam_ext\]/d' filename