Hi Raphael,

Raphael Hertzog wrote:
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).

OK, that's true, so it's not really a problem. Still, I don't like the use of perl. Much too heavy for the intended use.

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.

I think you might be right... If ps ax doesn't look at columns when it's piped, I'll back out the earlier commit on this issue. We'll need to look at this more closely.

Cheers,
Bart


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to