Splunk Search

Send command with SH

broccolino
New Member

Hi everyone,

I would need a .sh script that allows me to read only the second line of a file and then send it to machine B.

Example file:

timestamp_pippo.csv

"Row1_skipped"
"Row2_send_to_machine"

the file is in the path:
C:\Program Files\Splunk\var\run\splunk\csv

only the second row "row2_send_to_machine" (contains a unix command) must be sent to machine B

once the command has been sent, the file timestamp_pippo.csv must be deleted.
can you help me? I'm not familiar with .sh

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...