Skip to content

Instantly share code, notes, and snippets.

@ensup
Created May 9, 2019 12:54
Show Gist options
  • Select an option

  • Save ensup/08e29682ff63dc19bf8866c20c45225b to your computer and use it in GitHub Desktop.

Select an option

Save ensup/08e29682ff63dc19bf8866c20c45225b to your computer and use it in GitHub Desktop.

Revisions

  1. ensup created this gist May 9, 2019.
    2 changes: 2 additions & 0 deletions check-ip.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #!/bin/bash
    ip addr | grep "inet " | grep brd | awk '{print $2}' | awk -F/ '{print $1}'