File: inetaddress.sh

package info (click to toggle)
didiwiki 3.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,912 kB
  • sloc: ansic: 5,985; sh: 1,532; makefile: 27
file content (3 lines) | stat: -rwxr-xr-x 147 bytes parent folder | download
1
2
3
#!/bin/sh
str=`ifconfig | grep -Eo 'inet (addr:|adr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
echo ${str%% *}