0

I'm not very good with regular expressions but I need to insert in a file called (prepared_scenarios.prm) that contains this text:

Scenario Set Files=${datadir}/inputs/scenarios/file.ce

To become like this:

Scenario Set Files=${datadir}/inputs/scenarios/ready_file.ce

How I can achieve this simple way? I don't seem to get around the bars /.

I'm using Linux Cent OS 7 (Core).

Cyrus
  • 84,225
  • 14
  • 89
  • 153
  • In the meantime I found a solution that can be useful for others with the same problem. When a bar / is found it needs to be escaped by the opposite bar \. So in the sed expression it should be represented as \ / with no space. `sed -i 's/inputs\/scenarios\//&ready_/' prepared_scenarios.prm` – Silverwolf Oct 13 '22 at 12:04

0 Answers0