How to use bash $(awk) in single ssh-command?

后端 未结 6 568
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 21:18

I am trying to execute a single command over ssh that contains `sub-code` or $(sub-code) (I use it all the time but I don\'t know the official name for that) to

6条回答
  •  青春惊慌失措
    2020-12-02 21:35

    What about piping the output of the command and run awk locally?

    ssh yourhost uname -a | awk '{ print $2 } '
    

提交回复
热议问题