foo

Mac OS command line suckage

Situation: program foobar is running on a Mac OS box and on a Linux box. I verified that using "top" (I'm working in an 80x25 xterm btw). Now the funny part:

Linux:

user@linux$ ps aux | grep foobar
root [...] /usr/sbin/foobar --some-options --more --options --even --more --options

Mac OS:

user@macos$ ps aux | grep foobar

Huh? What's going on? I know the program is running on both boxes! Mind-boggling solution after a long time of swearing and wasting time:

user@macos$ ps auxww | grep foobar
root [...] /usr/sbin/foobar --some-options --more --options --even --more --options

WTF? I mean... WTF??? Mac OS sticks the physical output on the terminal — 80 characters per line — into the pipe (instead of the full content). That's why the grep for "foobar" returns nothing - the "foobar" part is beyond the 80 character mark...

So if I resize my terminal to 20x10, only 20 characters per line would go into the pipe?!? How stupid is that?

Do all BSD-type OSes do that?

Syndicate content