My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
140 B

  1. #!/bin/bash
  2. device=enp0s25
  3. ip="$(ip -4 addr show $device|grep -oP '(?<=inet )\d*(\.\d*){3}')"
  4. if [ "$ip" != "" ]; then
  5. echo " $ip"
  6. fi