I have found a few users suggesting that echo "list clients" | bconsole is an 
ideal way to pass a command into bconsole and get the results to shell. I found 
this very useful at times, particularly when issuing the messages command as 
they scroll much slower in bconsole than in shell.

issuing the command with the | in it is not convenient or fast when typing, so 
I wanted to create an alias to handle this. The problem was that the pipe '|' 
would break the alias command as normally written.

Placing the following text into your .bashrc file will create the function 
BconCommand and alias it to bcon, which will allow you to pass in quote 
encapsulated commands to bconsole and get the results back to your ssh terminal 
a little faster and easier.


alias bcon=BconCommand
function BconCommand()
{
echo $1 | bconsole
}


usage:
bcon 'list clients'
bcon 'list jobs'
bcon 'list jobid=2551'

+----------------------------------------------------------------------
|This was sent by kirkdhamm...@gmail.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to