brona / iproute2mac

CLI wrapper for basic network utilites on Mac OS X inspired with iproute2 on Linux systems - ip command.
MIT License
898 stars 73 forks source link

send help messages to stderr #6

Closed rgcr closed 9 years ago

rgcr commented 9 years ago

Hello, I'm developing a script and I found this.

ip --error 2>/dev/null || echo "TRUE"

Output:


ip --error 2>/dev/null || echo "TRUE"                                                                               
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip -V
where  OBJECT := { link | addr | route | neigh }
       OPTIONS := { -4 | -6 }

iproute2mac
Homepage: https://github.com/brona/iproute2mac
This is CLI wrapper for basic network utilities on Mac OS X inspired with iproute2 on Linux systems.
Provided functionality is limited and command output is not fully compatible with iproute2.
For advanced usage use netstat, ifconfig, ndp, arp, route and networksetup directly.
TRUE

It should be like this python ip.py --error 2>/dev/null || echo "TRUE"

Output:

TRUE