I was trying to use window batch file to run CLI search command.
The command is something like this:
splunk search "index=xx |eval xx| table xx xx xx" -output csv c:\test.csv
This cmd like works when I manually key in on cmd prompt, but when I saved the file as a batch files or *.cmd, the command will only run : splunk search "index=xx
I know the pipe in cmd needs to be escaped using caret (^|). However, it is not working even when I added the caret.
Thanks in advance.