I need to grep to IP address ( as the following example ) , I use ksh script ,
# ifconfig -a | /usr/xpg4/bin/grep "100\.106\.2\.120 "
inet 100.106.2.120 netmask ffffff00 broadcast 100.106.2.255
but how to grep IP address from parameter ( IP_ADDRESS ) ?
- Remark - IP address could be any IP
how to add the back slash in this case
IP_ADDRESS=192.2.34.2 , or IP_ADDRESS=192.2.34.20 ... etc
# ifconfig -a | /usr/xpg4/bin/grep "$IP_ADDRESS "