Skip to content

Instantly share code, notes, and snippets.

@ruan65
Last active September 4, 2016 19:09
Show Gist options
  • Save ruan65/e9e4bfb97b94b69ddbc910daec4897b8 to your computer and use it in GitHub Desktop.
Save ruan65/e9e4bfb97b94b69ddbc910daec4897b8 to your computer and use it in GitHub Desktop.
ssh root@MachineB 'bash -s' < local_script.sh
PID=`ps -ef | grep rest-ser | grep -v grep | awk '{print $2}'`
#!/bin/bash
PID=`ps -ef | grep rest-ser | grep -v grep | awk '{print $2}'`
echo $PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment