I am trying to write a short script that will SSH to a remote server, execute a few commands, and return the output prices and such, which I will parse locally.
So far, I am trying this, but it just hangs:
ssh user@server_name 'redis-cli; hmget IBM last updated; quit' > output.txt
The actual output will be 3 lines:
- "1234.56"
- "IBM"
- "11/13/2020 17:44:02"
Any way to run these commands and capture those 3 lines?
Thanks!