Microsoft
Software
Hardware
Network
Question : sed to delete lines with multiple matching patterns
I have a file that contains a list of names. (approx 80) I would like to use these names to feed into sed and delete every line that contains any of these names. I cant seem to figure out how to have an expression that contains all of these names, delete all of the lines that contain these names, and then write what is left to another file??
cat file | sed -e /expression/'d
Thanks for any help
Answer : sed to delete lines with multiple matching patterns
Hello andrew_89,
echo "sed "
cat file | while read name
do
echo -n "-e \"/$name/d\" "
done
redirect the output of the above script to a file and see if this is the command you are looking for.
Regards,
sunnycoder
Random Solutions
Delete old mail from Exchange 2003
Vista Network Drive - Application Not Found
How to use trusted connection: CR 8.5, VB6, SQL Server
cookie
Textcopy with trusted connection and Windows authentication
stop error screen
Exc 5.5 Directory Shares
Database inconsistent in Exchange Server 2000
Adwords coupons
Program and method for moving files between drives