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
Cannot enable "Server Certificate" under Secure Communications in IIS 5.0
Users and groups in Windows XP Pro
Need help with video/audio codec for portable mp4 player
Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server.
GPResult return wrong Domain Type
Out of resources error when moving lots of files
Auto-reply issue (Outlook 2003/Exchange 2007)
Event Listener that waits for a MovieClip to stop playing.
Configure directory on linux server to block access to public, but allow access from web application.
Vue 5 Infinite tutorials