LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-14-2013, 05:05 PM   #1
munkz
Member
 
Registered: Aug 2013
Location: A couch
Distribution: linux
Posts: 69

Rep: Reputation: 2
Question Getting sed regex mojo correct.


HI,

I am trying to figure out two things:
  1. sed to print all matches on a regex with out edit
  2. sed inline to remove matched edit after review

I have the regex ok. Using egrep in the following gives me all the matches :
Code:
for i in $(egrep -rl 'eval\(base64_decode\("CmVyc?.*\)\)\;' ./*|wc -l);do echo "Total infected files is $i";done
Total infected files is 2157
I am just not sure how to take the regex and add in to sed. Can anyone help with this?

Thanks for looking.
 
Old 11-15-2013, 10:15 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
sed -n /whatever/p
 
1 members found this post helpful.
  


Reply

Tags
grep, regex, sed, sed regex



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sed and regex help zski128 Programming 5 12-13-2011 10:30 AM
sed regex say_hi_ravi Programming 3 09-15-2011 02:12 AM
Help with sed regex homer_3 Linux - General 1 08-18-2009 01:57 PM
regex with sed to process file, need help on regex dwynter Linux - Newbie 5 08-31-2007 05:10 AM
Help with Sed and regex cmfarley19 Programming 6 11-18-2004 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration