Quantcast
Channel: Latest Questions on Splunk Answers
Viewing all articles
Browse latest Browse all 13053

feeding fields to an external script

$
0
0

I've written a little python one-liner that basically calls showmount -a with an argv array at the end and my goal is to be able to feed it a list of hosts and get the showmount output for each host.

if I do: | showmount <hostname>

this works

if I do

host=pattern* | showmount host

nothing happens.

this is the extent of my oneliner:

subprocess.call(['showmount', '-a', sys.argv[1]])

What can I do to make this actually show me a list per host with each host being an event?


Viewing all articles
Browse latest Browse all 13053

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>