Prev: Extended deadline (15 July 2010): CACS Singapore [EI Compendex,ISTP,IEEE Xplore]
Next: Process question
From: Mateusz_madi on 24 May 2010 11:26 I wan't to show all lines from file which consist of only 3 char: grep ^.{3}$ file Why this does't work?? Isn't it the same as : grep ^...$ file ?? madi
From: Ike Naar on 24 May 2010 11:33 In article <a7b3d37e-d60c-42ac-aa96-c88c1c53e2f4(a)q13g2000vbm.googlegroups.com>, Mateusz_madi <madi.czadi(a)gmail.com> wrote: >I wan't to show all lines from file which consist of only 3 char: >grep ^.{3}$ file >Why this does't work?? Isn't it the same as : >grep ^...$ file ?? grep '^.\{3\}$'
From: Mateusz_madi on 24 May 2010 11:38 Thanks Ike Naar >>>
From: Marc on 24 May 2010 11:39 Mateusz_madi wrote: > I wan't to show all lines from file which consist of only 3 char: > grep ^.{3}$ file > Why this does't work?? Isn't it the same as : > grep ^...$ file ?? grep -E "^.{3}$" file seems to work better (or egrep). Or use \{ and \}.
From: Mateusz_madi on 24 May 2010 11:57 Hmm so you have used -E option, an ^.{3}$ works fine! which mean extended grep what is the difference between extended and normal one?
|
Next
|
Last
Pages: 1 2 Prev: Extended deadline (15 July 2010): CACS Singapore [EI Compendex,ISTP,IEEE Xplore] Next: Process question |