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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...