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
Check if FTP upload was successful
""PXE-E61: Media test failure, check cable" Built 2003 Server as DC w/Active Dir. Worked well 3 days, now this... Help
Project Server 2007 install asp.net error
Script to Connect a home directory in Active Directory
MINUS query -Why cannot work?
Windows Update won't work after upgrade from XP Home to XP Professional
event listener for error with loader?
Exchange 2007 CAS HUB Question ?
Access - Calendar table
Using NoNav to silently uninstall Symantec Antivirus