Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Can someone explain what these arguments mean?

$
0
0
Hi folks,

I am betting this is a very simple thing, but I admit i don't know the proper terms to search it out correctly.

I am self-learning at work.
I've come on a section of code in a script:
Code:

/usr/sbin/ping $dev 5 2 2>&1 | /usr/xpg4/bin/egrep -s "unknown host|no answer"
What I can't figure out(or search out) is what the arguments "5 2 2>&1" are doing??

I thought it was setting 2 '5 byte messages' with a time to live of 2...something.
But I can not find any data to support that or otherwise explain what's going on here.

So thanks to anyone who can explain this.

Marc

Viewing all articles
Browse latest Browse all 16232

Trending Articles