user2729439
user2729439

Reputation: 13

Sed regexp not working, what's my error

I have infected files with some trojan. I need to clean.

Code like this;

/*17da00*/
.
.
.
/*17da00*/

I want to change space char start with /*17da00*/ and end with /*17da00*/.

I try to

sed -i 's|/*17da00.*\/\*17da00\*\/||g'

but not working. What is mistake? Thanks.

Note: I search and replace multiple files with other match using this.

grep -Rle "17da00" * | xargs sed -i 's/<!--17da00.*17da00-->/<!-- -->/'

Upvotes: 0

Views: 64

Answers (1)

konsolebox
konsolebox

Reputation: 75458

Try this form

sed -i '/\/\*17da00\*\//,/\/\*17da00\*\//d' file

Upvotes: 1

Related Questions