[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Grep -o inconsistency?
From: |
db |
Subject: |
Grep -o inconsistency? |
Date: |
Tue, 24 Jun 2008 19:39:13 +0200 |
User-agent: |
KMail/1.9.9 |
$ grep --version
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 file
field1;field2;field3
field4;field5;field6
$ grep -o '[^;]\+' file1
field1
field2
field3
field4
field5
field6
$ grep -o '[^;]*' file
field1
field4
The output of the first grep invocation is as expected, and I thought the
output of the second invocation should be the same, which isn't the
case. Is that expected behavior?
Thanks
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Grep -o inconsistency?,
db <=