On Thu, 2002-05-23 at 16:45, Kenny Donahue wrote: > Ok, here's one for all you bash experts out there. > I have a line in a script that does this: > > lspci -d1134:1 | /usr/bin/wc -l > > The idea of course is to get the number of our boards in the > system. the funny thing is, if I log in as root I get > 2 /* Note the 6 blank spaces before the "2" */ > > if I log in as my self or ssh into the machine and su to root, I get > 2 /* note NO space before the "2" */ > > if I ssh into the machine and "sh - " to root I get > 2 /* Note the 6 blank spaces before the "2" */ > again. What's up. > > I did clean up the spaces with sed so this is not a functional problem.
Okay, do I get a case of [root] beer for figuring this out? ;-) Check the setting of your POSIXLY_CORRECT environment variable. # lspci -d1134:1 | /usr/bin/wc -l 0 # export POSIXLY_CORRECT=1 # lspci -d1134:1 | /usr/bin/wc -l 0 It's in the man^Winfo page. (Note to others as annoyed as I am with the FSF's trend away from man pages towards info pages -- for vi type bindings, use pinfo instead of info availabe at http://zeus.polsl.gliwice.pl/~pborys/ and bundled with Red Hat.) -- -Paul Iadonisi Senior System Administrator Red Hat Certified Engineer / Local Linux Lobbyist Ever see a penguin fly? -- Try Linux. GPL all the way: Sell services, don't lease secrets ***************************************************************** To unsubscribe from this list, send mail to [EMAIL PROTECTED] with the text 'unsubscribe gnhlug' in the message body. *****************************************************************