Bacula-users

Re: [Bacula-users] filter output of list jobs

2014-10-31 16:09:15
Subject: Re: [Bacula-users] filter output of list jobs
From: Bill Arlofski <waa-bacula AT revpol DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 31 Oct 2014 16:02:01 -0400
On 10/31/14 13:56, Jeff MacDonald wrote:
> Hi,
> 
> Can I do something like
> 
> list jobs status=successful 
> 
> or 
> 
> list jobs job=job123
> 
> I’m looking for better ways to be able to filter jobs on the command line etc.
> 
> Jeff


Jeff, from a shell prompt or a script you can do this:


echo "list jobs" | bconsole -c /path/to/bconsole.conf  | grep " T "

or


echo "list jobs" | bconsole -c /path/to/bconsole.conf  | grep " 1,234 "


And then a little tr, sed, and/or awk to format it

Bill



--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>