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
  • 27,428
  • 11
  • 44
  • 69
TheBeginner
  • 405
  • 5
  • 23

0 Answers0