BASH: Extract only IP Address from ip addr command Dushmantha Charaka ipaddress May 25, 2017 Hello , You can use below shell script to extract only IP address from ip command. Command : ip addr show | grep -oP 'inet …