File: ipofif

package info (click to toggle)
ipmasq 3.4.4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 300 kB
  • ctags: 3
  • sloc: sh: 281; makefile: 48
file content (12 lines) | stat: -rwxr-xr-x 240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
#
# ipofif	Determines the IP address of the interface given on the
#		commandline
#
# v1.0	19 July 1998
# v1.1  12 June 1999
#####

export LC_ALL="C"

/sbin/ifconfig $1 | grep 'inet addr:' | sed 's/.*inet addr:\([0-9.]*\).*/\1/g'