Previous: Command-Line Options, Up: Invoking sed [Contents][Index]
An exit status of zero indicates success, and a nonzero value
indicates failure. GNU sed
returns the following exit status
error values:
sed
extension command used with --posix
.sed
aborted immediately.
Additionally, the commands q
and Q
can be used to terminate
sed
with a custom exit code value (this is a GNU sed
extension):
$ echo | sed 'Q42' ; echo $? 42