Need only IP address as marked in the below image and nothing else.
Could someone please provide a specific bash command?
Need only IP address as marked in the below image and nothing else.
Could someone please provide a specific bash command?
You can use something like this :
ifconfig wlan0| awk '/inet /{print $2}'
ifconfig wlan0| grep -w "inet"|cut -d" " -f2
You can do it by only grep.
ifconfig wlan0 | grep -oE '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'