Script output

(imported topic written by lynne_linwei91)

Hi BigFix Product Support,

We are OIT team form princeton University,

We have lots of windows systems with bigfix installed . We are testing

if bigfix application is userful for our Linux and Solaris systems.

So we tried to run the shell scripts on bigfix console, and we expect to

see the output, however we did not find the output on the bigfix

GUI interface screen.

The simple script such as

#!/bin/sh

echo “adding account in /etc/passwd”

mv /etc/passwd /etc/passwd.old

Is it possible to see the output? what should I do in order to see the

scripts output? please give us the detail information.

This is important because it conerned with if we’ll buy the bigfix

products for our Linux and Solaris servers,

Thanks,

-Lynne

ESS group, OIT

Princeton University,

(o) 609-2586017

(imported comment written by BenKus)

Hi lynne,

This is not quite BigFix support… this is the public user forum where people discuss aspects of BigFix and we are happy to answer your questions, but you might want to send direct email to BigFix support http://www.bigfix.com/contact/index.php if you want a case opened.

The answer to your question is that the BigFix agent does not capture the standard out for the action unless you specifically write the output to a file… to do this, you can either pipe each line to a file… or you can create the script, run it, and pipe the results of the whole script to a file… You can then return the contents of output file in a property.

We have an open request to return the stdout and stderr directly in the action in future versions to make this a little easier.

Ben

(imported comment written by jclaunch91)

“You can then return the contents of output file in a property.”

How is this done? I’ve been researching, but am coming up empty. We are trying to do a very similar task:

ie we are doing:

cat /etc/passwd |someotherstatements > /tmp/output.passwd

How do I put that above in a bigfix property so I can run a report on it?

Thanks so much in advance.

–Jeff

(imported comment written by NoahSalzman)

It’s a two step process:

  1. create a Task that has a simple “shell script” ActionScript (such as your cat command above)

  2. create an Analysis to read the output, such as

lines of file “/tmp/output.passwd”