Re: grep with multiple and

On 11 fév, 10:47, marc <marc.tes...@xxxxxxxxxxxx> wrote:
On 10 fév, 18:24, Spiros Bousbouras <spi...@xxxxxxxxx> wrote:

On 10 Feb, 13:12, marc <marc.tes...@xxxxxxxxxxxx> wrote:

On 9 fév, 23:37, Spiros Bousbouras <spi...@xxxxxxxxx> wrote:

Could you cut and paste the exact command line
you used?

It's simply :

find ./ -name '*.*' -exec nawk -v x=1 -v y=1 '/-BRA/ {x = 0}; /FRA/ {y
= 0} END {exit x+y}' {} \; -print

Since the above wraps around and I get a strange character after
the = I will rewrite is as follows:

find ./ -name '*.*' -exec                       \
nawk -v x=1 -v y=1                              \
'/-BRA/ {x = 0}; /FRA/ {y = 0}  END {exit x+y}' \
{} \; -print

So the above does not produce any output ?

With grep or awk, it scans a certain number of files (~170), then it
freezes, with any file (even empty)...
Thanks anyway.
I give up...- Masquer le texte des messages précédents -

Finally, I've found the problem : it hangs when there are pipes or
files beginning with "."
Thanks to all.

Relevant Pages

  • Re: General UNIX puzzle
    ... All of those (sed, awk, grep) involve making a copy of the original file ... The gnu shtool is one of the most useful tools for this for in-place ... A Galileo could no more be elected president of the United States than ...
  • Re: ssh and chroot
    ... ++ echo /bin/mkdir ... ++ awk '' ... ++ grep '^/' ...
  • Re: The smartest band in the world?
    ... I mainly use grep, but I'm ... going to learn awk and sed and improve my bash scripting. ... Oracle accreditation coure, well in the grad courses at least, everything ...
  • Re: All the world seems in tune
    ... both of which use 2-byte pointers into the pattern, ... runs into this limit in grep, and sometimes it's a Real Pain In The ... I'm not going to rewrite it right away. ... fiber splicing kit for the tiny tots to have Fun with just like Daddy (but ...
  • Re: Difference between Cygwin and DOS handling of string input
    ... Ton of userland tools that make work possible (perl, sed, awk, grep, ... cmd.exe is a shell in that it's a TTY that lets you run commands, ...