in reply to Re: greping from directories
in thread greping from directories
But what I found is that I had supplied bad path names. When I used correct path names in my experiment, the code you supplied worked fine.
The differences in my setup were that I created directories as you showed, but mine were beneath my home directory rather than immediately below the root directory. Otherwise, everything else was probably the same.
Here's what I did:
$ mkdir main22 main23 $ mkdir main22/loges main23/loge $ echo "john\nfile2" >main22/loges/de.pl $ echo "john1\nfile3" >main23/loge/do.pl $ grep file2 /home/flame/main23/loge/do.pl /home/flame/main22/loges/de +.pl $ perl -e 'system qq{grep file2 /home/flame16/main23/loge/do.pl /home/ +flame16/main22/loges/de.pl}'
---v
|
|---|