[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15444: (no subject)
From: |
Paul Jackson |
Subject: |
bug#15444: (no subject) |
Date: |
Fri, 15 Jul 2016 00:17:52 -0500 |
Leon wrote:
>> Sorry; in my previous e-mail there was a wraparound induced by the e-mail
>> composer. This one is hopefully better:
>> $ echo "
>> "| grep --color=always '[1-9]'
>>
>> python2 -c 'print " " * 80, 1234' | grep --color=auto '[1-9]'
>>
>> This one does work for a standard 80-char-wide (u)xterm.
The above two commands are not the same.
That echo command seems to emit 79 spaces, followed by one newline (but no
numbers at all ??)
That (my) python2 command emits 81 spaces, the four numbers, and a newline.
Try this one (fixing my off-by-one space count, as the ',' comma in print args
emits a space of its own):
python2 -c 'print " " * 79, 1234' | grep --color=always '[1-9]'
And try this one (fixing what I guess is your accidental omission of one space
and the four numbers):
echo "
1234"| grep --color=always '[1-9]'
I get the same results from either of the last two test cases above, with the
red "1234" numbers
NOT appearing in an 80 wide xterm or uxterm, but appearing ok if I widen the
terminal.
--
Paul Jackson
address@hidden