I would like to replace specific line eg ExitAction = NONE to ExitAction = FALSE under only TASK sipsiproc and other ExitAction = NONE will remain as usual in the file(shell script)
Could you explain a little more on how the second perl solution works? I can't figure out how the substitute knows which "ExitAction = NONE" to substitute. I see that you're qualifying it with the if statement, but I still don't see how that makes the substitute get right "ExitAction = NONE" and not the first "ExitAction = NONE" .
Sure,
the -00 flag+argument turns the paragraph mode on.
From perldoc perlrun:
In this mode each record is a paragraph of text terminated by one or more empty lines.
So change the ExitAction only for the record(s)/paragraph(s) that begin with the pattern "Task sipsiproc".