Skip to content

Instantly share code, notes, and snippets.

@joshtwo
Created January 29, 2019 03:28
Show Gist options
  • Save joshtwo/c3e9f90af73667b0c1873820f5d72c23 to your computer and use it in GitHub Desktop.
Save joshtwo/c3e9f90af73667b0c1873820f5d72c23 to your computer and use it in GitHub Desktop.
Reminder of how to do k00l stuff with `watch` in the shell.
#!/bin/bash
# If you want to do something fancy in a "watch" command, make a subshell
# remember that everything is getting passed to `sh -c`
sudo watch -d -- '(netstat -tpea --numeric-ports | grep tomcat9)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment