Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I have the following command that works Code: ssh root{at}IPADDRESS 'vim-cmd vmsvc/power.getstate 64 | grep Powered | awk "{ print $2}"' Which outputs the following text:- Powered on I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    18

    Question Bash: Remote SSH command append to AWK


    Hi,

    I have the following command that works

    Code:
    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

    Harv

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

  2. #2
    Just Joined!
    Join Date
    Sep 2010
    Posts
    18
    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
  •