0

I am trying to substitute timeout, and return 1 if the substitution fails.

abc.conf:

Title: ABC.conf
timeout : 10

sed command and output:

$ sed '/timeout/{s/timeout .*/timeout 100/g;Q};q1' abc.conf
$ Title:ABC.conf

But, sed fails to substitute returned 1, and in the output I only get the first line of the file.

What am I missing?

Emma
  • 26,487
  • 10
  • 35
  • 65
TheBeginner
  • 355
  • 2
  • 22

0 Answers0