|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
limits of grep
hi all,
i tried to grep the string '/**/' no ways w/ every possible conbinations, nota: i well know regexp. no probls w/ sed or perl, but grep any ideas thanks
__________________
working on Solaris[5-9], preferred languages french and C. |
|
#2
|
||||
|
||||
|
Popular versions of grep have the -E option to allow the use of extended regular expressions. Alternatively if you're just trying to search for the literal string '/**/' - escape the shell chars out as needed:
Code:
grep '\/\*\*\/' files
__________________
FreeBSD Admin Tips Tricks and Scripts |
|
#3
|
|||
|
|||
|
no ways w/ every possible conbinations,
|
|
#4
|
|||
|
|||
|
Quote:
Hello guggach, perhaps I do not quite understand your problem, but the following runs correctly on HP-UX: grep "/**/" <<! asdf sdfg ghf asdf dfgh wert /**/ asf asdf sdfg ghf asdf sdfg ghf asdf wert /**/ asf ! Regards ![]() |
|
#5
|
|||
|
|||
|
ok, my grep is buggy
yours is better !whitch grep are you using ? xpg4, gnu, own ? |
|
#6
|
|||
|
|||
|
Solaris 8
/usr/bin/grep (10032 bytes) $ /usr/bin/grep Usage: grep -hblcnsviw pattern file . . . zlutovsky's example works. /usr/xpg4/bin/grep - 13900 bytes $ /usr/xpg4/bin/grep Usage: grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [file ...] grep [-E|-F] [-c|-l|-q] [-bhinsvwx] -e pattern... [-f pattern_file]...[file...] grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [-e pattern]... -f pattern_file [file...] zlutovsky's example also works. GNU grep 2.5.1 works (on my debian box) too |
|
#7
|
|||
|
|||
|
Quote:
Hello guggach, sorry for my late answer, I have not been here for a long time. I have used no spetial grep, it was grep probably on Linux, I do not remember. Today I have rerun the script on HP-UX B.11.23, AIX 3 5, Linux 2.40.20-8 and on all these systems it works well. Regards ![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > limits of grep |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|