Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Bash: Remote SSH command append to AWK


    I have the following command that works

    ssh root{at}IPADDRESS 'vim-cmd vmsvc/power.getstate 64 | grep Powered | awk "{ print $2}"'
    Which outputs the following text:-

    Powered on

    I would like to Append some text so the output is:-

    Ubuntu Server: Powered on

    Every different variation that I have tried ends up in an unexpected token.

    Any ideas? Thanks in advance


    PS: Please ignore the {at} for the ssh command. This board saw it as external url and didn't like it

  2. #2
    Any ideas on this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts