I tried to pass username and password to the command '/opt/splunk/bin/splunk reload deploy-server' but its throwing "stdin appears to be a pipe" error , help me in fixing this error.
[splunk@ip-10-15-32-172 ec2-user]$ echo 'statraju QKGK=#ZNmHc0ao' | /opt/splunk/bin/splunk reload deploy-server
Splunk username:
An error occurred: Cannot prompt for password, stdin appears to be a pipe.
Another way: But same error
[splunk@ip-10-15-32-172 ec2-user]$ /opt/splunk/bin/splunk reload deploy-server << EOT
> statraju
> QKGK=#ZNmHc0ao
> EOT
Splunk username:
An error occurred: Cannot prompt for password, stdin appears to be a pipe.
Note: I don't want to use expect also I can get my command work using below way but I don't want /opt/splunk/bin/splunk reload deploy-server -auth statraju:QKGK=#ZNmHc0ao