0

I'm using sshpass to get the output of different statistics of a machine.
However the output is all bunched together:

sshpass -p *****_PASSWORD ssh -o StrictHostKeyChecking=no mlinfra@$ADDRESS 'hostname; w; df -h; free'

Ideally I would like to have a new line in between the output of hostname, w, df -h and free

1 Answer 1

1

It seems your question is just about formatting the output and independent from sshpass and ssh. So you could use just the echo command, i.e.:

ssh [email protected] 'hostname; echo; df -h; echo; free'

It will give you a new line in between the output of each command.

Thanks to

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.