On Sun, 12 Aug 2007, Bart Samwel wrote: > Hi there, > > Would it work if I just changed it to: > > displaynum=`COLUMNS=1000 ps ax | grep -e 'X .* vt'$console | grep -v grep > | sed -re 's!.*/X .*:([0-9]+).*!\1!'` > > I dislike the use of perl in your solution, the acpi-support package does > not use perl at the moment and I'm reluctant to add another dependency for > something as simple as this.
I don't like the use of perl either. However, please note that perl is "essential": $ dpkg -s perl-base | grep Essential: Essential: yes Thus you can use it and you don't need to add an explicit dependency on it (as long as you don't require any module from the "full" perl package). > The part about the non-maching regexps I > don't get, could you explain that a bit further? For now I'll simply > commit the COLUMNS=1000 fix and I'll assume that this fixes the COLUMNS > problem. It seems really strange to me too. Because ps ax doesn't limit its output when its ouput is piped... at least "ps ax | less" shows you the full line. I wonder if the bug has not been badly diagnosed. Cheers, -- Raphaël Hertzog Premier livre français sur Debian GNU/Linux : http://www.ouaza.com/livre/admin-debian/