On Tue, May 25, 2010 at 05:13:36PM +0400, Anatoly Pugachev wrote:
> On 04.05.2010 / 13:33:12 -0400, Morty Abzug wrote:
> > (12) bconsole should support an option for execute-one-command (i.e. -e)
>
> how it is different from:
>
> echo list jobs | bconsole
>
> but I've tried to implement "-e " command line switch, it takes about 30
> lines of code actually...
Sounds good. :) echo list jobs | bconsole requires more shell support
(pipes, possibly quoting) from the caller. For example, calling
bconsole from within bacula-dir.conf itself requires something like:
RunAfterJob = "sh -c 'echo umount | bconsole'"
bconsole -e simplifies that.
Ideally, bconsole -e should really return an exit code that reflects
the last error.
> > (13) bconsole should support an option for batch mode (i.e. -b)
>
> actually bconsole is always reading .bconsolerc file and you can put
> commands in it, but it's not a proper usage for a "batch mode". Writting a
> patch for batch mode should be no harder than my implementaion of "-e"
> command line. If anyone interested for a patch code review, I can push it
> to a SF git repository.
I may not have been very clear on that one. Some programs support a
batch mode where output is formatted for machine use rather than human
use. So, for example, less headers, no ASCII line art around table
output, and the like. See mysql's -B mode for an example.
- Morty
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|