Skip to content
David Callahan edited this page Dec 21, 2015 · 2 revisions

rsed has two input elements, an rsed script and a text file. The script is typically the first positional argument as in

rsed script.rsed < inputFile

The input file may also be specified via a command line parameter

rsed script.rsed -input inputFile

or rsed script.rsed -input=inputFile

When the -input parameters is used, then rsed may optionally read the script from standard in

rsed -input=inputfile -script_in < script.rsed

This is particularly useful for invoking rsed via a script. For example

 rsed -input=inputfile -script_in << "EndScript"
 ... the rsed script 
 EndScript 

Not that in the bash shell, enclosing the end of input sentinel in double quotes suppresses shell variable substitution which can be important as rsed shares a similar syntax for variables.

rsed supports some debugging flags as well:

  • -debug generates traces which interleave lines read from input and evaluation of rsed traces.
  • -dump generates a pretty-printed version of the parsed representation of the program.
  • -yydebug enables tracing of the bison based parser used in the current rsed implementation.

Clone this wiki locally