[augeas-devel] Make augtool quiet in batch mode.

Raphaël Pinson raphink at gmail.com
Tue Mar 31 08:17:01 UTC 2009



This patch makes augtool silent in batch mode, i.e. when stdin is a tty.
In order to avoid printing the prompt in batch mode, it uses getline in
this case.

cleanpath() has been refactored into a wrapper to a cleanstr() function
to make remove trailing newlines and spaces from the line grasped from
getline, which is not done automatically contrarily to readline.

This patch makes augtest output series of "Unknown command '\n'", but
all tests pass. I cannot reproduce this error by sending empty lines to
augtool in the shell, either with 'echo -e "command\ncommand" |' or 'cat <<EOF |'.






More information about the augeas-devel mailing list