[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep bug?
From: |
Robert Citek |
Subject: |
grep bug? |
Date: |
Mon, 14 Apr 2008 14:43:19 -0500 |
Adding -i with --color causes grep to hang:
$ true && (
set -x
grep -V
cat /etc/issue
locale
echo hello | grep --color=always -e ^
echo hello | grep -i --color=always -e ^ | hexdump -C | head -10
) &> output.txt
$ cat output.txt
+ grep -V
grep (GNU grep) 2.5.1
Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ cat /etc/issue
Ubuntu 7.10 \n \l
+ locale
LANG=en_US.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
+ echo hello
+ grep --color=always -e '^'
hello
+ echo hello
+ grep -i --color=always -e '^'
+ hexdump -C
+ head -10
00000000 1b 5b 30 31 3b 33 31 6d 1b 5b 30 30 6d 1b 5b 30 |.[01;31m.[00m.[0|
00000010 31 3b 33 31 6d 1b 5b 30 30 6d 1b 5b 30 31 3b 33 |1;31m.[00m.[01;3|
00000020 31 6d 1b 5b 30 30 6d 1b 5b 30 31 3b 33 31 6d 1b |1m.[00m.[01;31m.|
00000030 5b 30 30 6d 1b 5b 30 31 3b 33 31 6d 1b 5b 30 30 |[00m.[01;31m.[00|
00000040 6d 1b 5b 30 31 3b 33 31 6d 1b 5b 30 30 6d 1b 5b |m.[01;31m.[00m.[|
00000050 30 31 3b 33 31 6d 1b 5b 30 30 6d 1b 5b 30 31 3b |01;31m.[00m.[01;|
00000060 33 31 6d 1b 5b 30 30 6d 1b 5b 30 31 3b 33 31 6d |31m.[00m.[01;31m|
00000070 1b 5b 30 30 6d 1b 5b 30 31 3b 33 31 6d 1b 5b 30 |.[00m.[01;31m.[0|
00000080 30 6d 1b 5b 30 31 3b 33 31 6d 1b 5b 30 30 6d 1b |0m.[01;31m.[00m.|
00000090 5b 30 31 3b 33 31 6d 1b 5b 30 30 6d 1b 5b 30 31 |[01;31m.[00m.[01|
Regards,
- Robert
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep bug?,
Robert Citek <=