This is one the smallest trickping() {
if [ -z $1 ];
then
/bin/ping google.com
else
/bin/ping $@
fi
}Add this in your .bashrc,
If you do not provide any argument to ping command then it will try to ping google.com, 99% times i use to ping google.com so I added this shortcut in my bashrc, any modification will be welcome ! Will add this in schoolos bashrc too.
if [ -z $1 ];
then
/bin/ping google.com
else
/bin/ping $@
fi
}Add this in your .bashrc,
If you do not provide any argument to ping command then it will try to ping google.com, 99% times i use to ping google.com so I added this shortcut in my bashrc, any modification will be welcome ! Will add this in schoolos bashrc too.
By- Narendra Sisodiya
No comments:
Post a Comment