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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...