Difference between revisions of "Capture gateway IP using shell script"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Useful_bash_shell_scripts|Useful bash shell scripts</yambe:breadcrumb> =Capture gateway IP using shell script= To capture gateway IP using shell-script use:...")
 
m
 
Line 1: Line 1:
<yambe:breadcrumb>Useful_bash_shell_scripts|Useful bash shell scripts</yambe:breadcrumb>
[[Main_Page|Home]] > [[Shell scripting]] > [[Useful bash shell scripts]] > [[Capture gateway IP using shell script]]
=Capture gateway IP using shell script=


To capture gateway IP using shell-script use:
To capture gateway IP using shell-script use:

Latest revision as of 13:38, 7 April 2022

Home > Shell scripting > Useful bash shell scripts > Capture gateway IP using shell script

To capture gateway IP using shell-script use:

IP=$(/sbin/ip route | awk '/default/ { print $3 }')