Menu

05 December 2010

[tip] ping without argument.

This is one the smallest trick

ping() {
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: