0

I am trying to replace occurrences of pattern in a file. Lines in the file look like this:

****time is = 0000
****time is = 0001

I am trying to search string by case insensitive time is and want to replace time is = xxxx by ****.

I tried using sed 's/time \ is/.*' filename.txt

But I get error sed: -e expression #1, char : unterminated 's' command

Any suggestions?

Update

I corrected the command. sed 's/time \ is/.*/' filename.txt But this places .* = xxxx This is not I wanted. I wanted to replace the entire pattern by ****.

Original line: ****time is = 0000

Desired output: ********

Any sugegstions?

er34456
  • 11
  • 2

0 Answers0