[Israel.pm] open - pipe question
semuelf at 012.net.il
Tue Jan 13 14:12:39 PST 2009
I don't actually know which "dir" command I actually hit, but whatever
it is, if it works in the first code why don't it work in the second?
btw, /b = bare, (only file names, no headers and such) and /s is recursive.
Gaal Yahas wrote:
> Which "dir" command are you hitting? Does cygwin perhaps have a
> /bin/dir that functions a little like the unix ls -l (but which
> doesn't know DOSish /switches)?
> On Tue, Jan 13, 2009 at 8:48 PM, Shmuel Fomberg <semuelf at 012.net.il> wrote:
>> Hi All.
>> I have the following code:
>> open(FH, "dir $dir /s /b | grep mbd | wc |");
>> $wc = <FH>;
>> (the environment is cygwin, with Perl 5.6)
>> However, when I wanted to do the greping myself, I wrote this command:
>> open(FH, "dir $dir /s /b |");
>> And then "dir" complained that it can't find the /s and /b directories.
>> Any idea what is going on?
>> Perl mailing list
>> Perl at perl.org.il
More information about the Perl