4

Tip #676   The poor man's REPL

This is the general form; it will run 'mycommand' once for each line of text you enter with that line of text supplying the arguments to the command:

cat | xargs -L1 mycommand

Changing to ledit adds readline support:

ledit | xargs -L1 mycommand

Example: A simple REPL for sending commands to a DBus object:

ledit | xargs -L1 -ILINE dbus-send --print-reply --dest=mydest myobj myiface.LINE