Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nc tool different on different dists - seriously?



Hi folks, 

I am constantly switching between my ubuntu system on my desktop, and
our CentOS servers at work. This is the first time I have come across a
difference that broke a script ...

I use the tool 'nc' to to check the status of memcached caches on my
servers In production (CentOS) this works :

echo "stats" | nc localhost 11211

however it fails on the ubuntu machine. The ubuntu machine requires an
option

echo "stats" | nc -q1 localhost 11211

so I added that ' -q1' option to the script. Which in turn broke the
script on CentOS, which complains that there is no '-q' option.

After 'man'ing the tool on both machines it appears the CentOS version
truly does not have the '-q' option, and that the Ubuntu version really
needs it. 

How is it possible that such a nice tool can get soooo messed up? Anyone
know a way around this?

thanks

Richard







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org