ed: Invoking ed

1 
1 3 Invoking ed
1 *************
1 
1 The format for running 'ed' is:
1 
1      ed [OPTIONS] [FILE]
1      red [OPTIONS] [FILE]
1 
1    FILE specifies the name of a file to read. If FILE is prefixed with
1 a bang (!), then it is interpreted as a shell command. In this case,
1 what is read is the standard output of FILE executed via 'sh (1)'. To
1 read a file whose name begins with a bang, prefix the name with a
1 backslash ('\'). The default filename is set to FILE only if it is not
1 prefixed with a bang.
1 
1    'ed' supports the following options:
1 
1 '-h'
1 '--help'
1      Print an informative help message describing the options and exit.
1 
1 '-V'
1 '--version'
1      Print the version number of 'ed' on the standard output and exit.
1 
1 '-G'
1 '--traditional'
1      Forces backwards compatibility. This affects the behavior of the
1      'ed' commands 'G', 'V', 'f', 'l', 'm', 't' and '!!'. If the
1      default behavior of these commands does not seem familiar, then
1      try invoking 'ed' with this switch.
1 
1 '-l'
1 '--loose-exit-status'
1      Don't exit with bad status if a command happens to "fail" (for
1      example if a substitution command finds nothing to replace). This
1      can be useful when 'ed' is invoked as the editor for crontab.
1 
1 '-p STRING'
1 '--prompt=STRING'
1      Specifies a command prompt. This may be toggled on and off with the
1      'P' command.
1 
1 '-r'
1 '--restricted'
1      Run in restricted mode. This mode disables editing of files out of
1      the current directory and execution of shell commands.
1 
1 '-s'
1 '--quiet'
1 '--silent'
1      Suppresses diagnostics, the printing of byte counts by 'e', 'E',
1      'r' and 'w' commands, and the '!' prompt after a '!' command. This
1      option may be useful if 'ed''s standard input is from a script.
1 
1 '-v'
1 '--verbose'
1      Verbose mode; prints error explanations. This may be toggled on
1      and off with the 'H' command.
1 
1 
1    Exit status: 0 if no errors occurred; otherwise >0.
1