Re: qqx with quotes

2020-02-28 Thread ToddAndMargo via perl6-users

Left some stuff out.


my $PathIAm = $?FILE;
( my $IAm = $PathIAm ) ~~ s| .* "/" ||;

my Str $BatFile = $PathIAm ~ ".bat";
$BatFile ~~ s:global| '\\' |/|;

my Str $OS = $*KERNEL.name;
if not $OS eq "win32" {
   say "Sorry, $IAm only work in Windows.";
   exit; }
( $IAm = $PathIAm ) ~~ s| .* '\\' ||;

my Str $CmdStr =
   Q[@echo off] ~ "\n" ~
   Q[C:\Windows\System32\fsutil.exe usn readdata ] ~
   Q["] ~ $FileName ~ Q["] ~ "\n";
# say $CmdStr;


spurt( $BatFile, $CmdStr );
say qqx { $BatFile };


Re: qqx with quotes

2020-02-28 Thread ToddAndMargo via perl6-users

I have a work around!

I am taking advantage of the Windows build in programming
language from hell (batch):


my $PathIAm = $?FILE;
( my $IAm = $PathIAm ) ~~ s| .* "/" ||;

my $FileName = "@*ARGS[0]";

my Str $CmdStr =
Q[@echo off] ~ "\n" ~
Q[C:\Windows\System32\fsutil.exe usn readdata ] ~
Q["] ~ $FileName ~ Q["] ~ "\n";

spurt( $BatFile, $CmdStr );
say qqx { $BatFile };




C:\NtUtil>raku k:\Windows\NtUtil\FileAttributes.pl6 "Test 1"

Major Version: 0x3
Minor Version: 0x0
FileRef# : 0x00580340
Parent FileRef#  : 0x00130eb9
Usn  : 0x711dab68
Time Stamp   : 0x 12:00:00 AM 1/1/1601
Reason   : 0x0
Source Info  : 0x0
Security Id  : 0x0
File Attributes  : 0x20
File Name Length : 0xc
File Name Offset : 0x4c
FileName : test 1


Re: qqx with quotes

2020-02-28 Thread ToddAndMargo via perl6-users

On 2020-02-27 11:05, Andy Bach wrote:

This did work
my $file = 'hi mom'
$file ~~ s:g/\s+/*/;
my $res = qqx(dir $file);
say $res;



Just updated to 2020.01

Still getting this:


C:\NtUtil>dir Test*
 Volume in drive C has no label.
 Volume Serial Number is 8A79-8401

 Directory of C:\NtUtil

02/27/2020  12:56 AM 5 test 1
02/27/2020  12:56 AM 5 test2
   2 File(s) 10 bytes



C:\NtUtil>raku k:\Windows\NtUtil\FileAttributes.pl6 "Test 1"
FileName 
Usage : fsutil usn readData 
   Eg : fsutil usn readData C:\Temp\sample.txt
Error:  The filename, directory name, or volume label syntax is incorrect.
Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 
1, signal => 0, pid => 1528, command => ("C:/Windows/System32/fsutil.exe 
usn readdata \"\$FileName\"",))



The code looks like this:

say "FileName <" ~ $FileName ~ ">";
@Result = qqx { C:/Windows/System32/fsutil.exe usn readdata "$FileName" 
}.lines;

for @Result -> $Line  { say $Line; };

@Result = shell( 'C:/Windows/System32/fsutil.exe usn readdata 
"$FileName"' );

for @Result -> $Line  { say $Line; };


:'(

-T


Re: qqx with quotes

2020-02-28 Thread ToddAndMargo via perl6-users

> On 2020-02-27 15:38, Andy Bach wrote:
>> Win10 with a new raku install.


*From:* Todd Chester via perl6-users 
*Sent:* Friday, February 28, 2020 4:57 AM
*To:* perl6-users@perl.org 
*Subject:* Re: qqx with quotes

would you do a
 perl6 -v
for me?



On 2020-02-28 10:27, Andy Bach wrote:

rakudo 2020.01 built on moar 2020.01.1 implementing perl 6.d



Interesting.  The developers and still talking about
how to fix this over on #20:

https://github.com/Raku/problem-solving/issues/20

Where did your get your 2020.01 from?

Also, would you do a "winver.exe" and tell me what your
"Build" is?   1909?


Re: qqx with quotes

2020-02-28 Thread Andy Bach
rakudo 2020.01 built on moar 2020.01.1 implementing perl 6.d

From: Todd Chester via perl6-users 
Sent: Friday, February 28, 2020 4:57 AM
To: perl6-users@perl.org 
Subject: Re: qqx with quotes



On 2020-02-27 15:38, Andy Bach wrote:
> Win10 with a new raku install.

would you do a
perl6 -v
for me?


Re: qqx with quotes

2020-02-28 Thread Todd Chester via perl6-users




On 2020-02-27 15:38, Andy Bach wrote:

Win10 with a new raku install.


would you do a
   perl6 -v
for me?


Re: qqx with quotes

2020-02-27 Thread Andy Bach
> What OS did you test this on?
Win10 with a new raku install.  Wouldn't help if you've got other files that 
fit the glob, I suppose.  Did it not work for you?

From: ToddAndMargo via perl6-users 
Sent: Thursday, February 27, 2020 2:03 PM
To: perl6-users@perl.org 
Subject: Re: qqx with quotes

On 2020-02-27 11:05, Andy Bach wrote:
> This did work
> my $file = 'hi mom'
> $file ~~ s:g/\s+/*/;
> my $res = qqx(dir $file);
> say $res;

Hi Andy,

What OS did you test this on?

-T


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-27 11:05, Andy Bach wrote:

This did work
my $file = 'hi mom'
$file ~~ s:g/\s+/*/;
my $res = qqx(dir $file);
say $res;


Hi Andy,

What OS did you test this on?

-T


Re: qqx with quotes

2020-02-27 Thread Andy Bach
This did work
my $file = 'hi mom'
$file ~~ s:g/\s+/*/;
my $res = qqx(dir $file);
say $res;



From: Andy Bach 
Sent: Wednesday, February 26, 2020 4:16 PM
To: ToddAndMargo via perl6-users 
Subject: Re: qqx with quotes

 @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata \"$FileName\" 
}.lines;

Doesn't windows do something special for files with spaces in them?  Hm,
$ type "hi mom" > "test 1"
$ dir test
$ dir "test 1"

but, you're right, I couldn't find a combination of dbl, single, q, qq, qqx, qx 
that'd let me run
dir "test 1"
via qqx or qx - windows is funny that way, I guess.

From: ToddAndMargo via perl6-users 
Sent: Tuesday, February 25, 2020 11:12 AM
To: perl6-users@perl.org 
Subject: Re: qqx with quotes

>> On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users
>> mailto:perl6-users@perl.org>> wrote:
>>
>> Hi All,
>>
>> Windows 7
>>
>> In the following
>>
>> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
>> \"$FileName\" }.lines;
>>
>>
>> $FileName needs to be in quotes as it can have
>> spaces in it.
>>
>>
>> The following did not work:
>>
>> \"$FileName\"
>> "$FileName\
>> $FileName
>>
>> What am I doing wrong, this time?
>>
>> Many thanks,
>> -T

On 2020-02-25 08:29, Paul Procacci wrote:
> The following works on FreeBSD:
>
> my $fn = "file name";
> say qqx { ls -l "$fn" };
>
> Not sure why this would be any different on Windows.

What version are you running?


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-27 03:22, ToddAndMargo via perl6-users wrote:

On 2020-02-27 02:05, ToddAndMargo via perl6-users wrote:

On 2020-02-27 00:52, ToddAndMargo via perl6-users wrote:

On 2020-02-27 00:01, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples 
shown I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


JJ closed it:

   "Sorry, Todd, not the place for this. This would
   probably go better in StackOverflow or in the mailing
   list."


This is the stack exchange post I made (before JJ
closed the bug by the way):

Raku: what is the syntax for shell calls with spaces?
https://stackoverflow.com/questions/60425787/raku-what-is-the-syntax-for-shell-calls-with-spaces 



JJ gave some examples with the "echo" command and shell,
which was not very helpful.
:
I just added the result to my actually code of doing
that with shell and JJ's echo recommendations and the
problem reproduces.


Reopened the bug at a better location as
recommended by Patrick and Niner:

qqx, shell not operating quotes properly
https://github.com/rakudo/rakudo/issues/3518


Turn out it was a duplicate of

How should Proc::Async.new, run and shell call cmd.exe?
https://github.com/Raku/problem-solving/issues/20


Turn out the problem wasn't me this time.  Guess there is
a first time for everything.  Feels a bit strange though.

I wish it was me, because I can fix that.


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-27 02:05, ToddAndMargo via perl6-users wrote:

On 2020-02-27 00:52, ToddAndMargo via perl6-users wrote:

On 2020-02-27 00:01, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples 
shown I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


JJ closed it:

   "Sorry, Todd, not the place for this. This would
   probably go better in StackOverflow or in the mailing
   list."


This is the stack exchange post I made (before JJ
closed the bug by the way):

Raku: what is the syntax for shell calls with spaces?
https://stackoverflow.com/questions/60425787/raku-what-is-the-syntax-for-shell-calls-with-spaces 



JJ gave some examples with the "echo" command and shell,
which was not very helpful.
:
I just added the result to my actually code of doing
that with shell and JJ's echo recommendations and the
problem reproduces.


Reopened the bug at a better location as
recommended by Patrick and Niner:

qqx, shell not operating quotes properly
https://github.com/rakudo/rakudo/issues/3518


Turn out it was a duplicate of

How should Proc::Async.new, run and shell call cmd.exe?
https://github.com/Raku/problem-solving/issues/20


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-27 00:52, ToddAndMargo via perl6-users wrote:

On 2020-02-27 00:01, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples 
shown I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


JJ closed it:

   "Sorry, Todd, not the place for this. This would
   probably go better in StackOverflow or in the mailing
   list."


This is the stack exchange post I made (before JJ
closed the bug by the way):

Raku: what is the syntax for shell calls with spaces?
https://stackoverflow.com/questions/60425787/raku-what-is-the-syntax-for-shell-calls-with-spaces 



JJ gave some examples with the "echo" command and shell,
which was not very helpful.
:
I just added the result to my actually code of doing
that with shell and JJ's echo recommendations and the
problem reproduces.


Reopened the bug at a better location as
recommended by Patrick and Niner:

qqx, shell not operating quotes properly
https://github.com/rakudo/rakudo/issues/3518


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-27 00:01, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples shown 
I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


JJ closed it:

   "Sorry, Todd, not the place for this. This would
   probably go better in StackOverflow or in the mailing
   list."


This is the stack exchange post I made (before JJ
closed the bug by the way):

Raku: what is the syntax for shell calls with spaces?
https://stackoverflow.com/questions/60425787/raku-what-is-the-syntax-for-shell-calls-with-spaces

JJ gave some examples with the "echo" command and shell,
which was not very helpful.

I just added the result to my actually code of doing
that with shell and JJ's echo recommendations and the
problem reproduces.


Re: qqx with quotes

2020-02-27 Thread ToddAndMargo via perl6-users

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples shown 
I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


JJ closed it:

  "Sorry, Todd, not the place for this. This would
  probably go better in StackOverflow or in the mailing
  list."


Re: qqx with quotes

2020-02-26 Thread ToddAndMargo via perl6-users

On 2020-02-26 18:41, Tom Browder wrote:
On Wed, Feb 26, 2020 at 19:47 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>>

...

Hmm, this don't [sic] work either:

perl6 -e "my $proc=run( 'dir', 'test 1', :out ); my @RtnStr  = $$proc.
out.slurp-rest.lines; for @RtnStr -> $Line { say $Line;}"


Todd, sloppy copy/paste or error with double dollar signs. What resulted?

-Tom


Nothing even error out.  No return

This is the exact command I am trying to run:

C:\NtUtil>fsutil usn readdata "C:/NtUtil/test 1"

Major Version: 0x2
Minor Version: 0x0
FileRef# : 0x001900021a81
Parent FileRef#  : 0x001e5b8b
Usn  : 0x460f7dd8
Time Stamp   : 0x 00:00:00 1/1/1601
Reason   : 0x0
Source Info  : 0x0
Security Id  : 0x0
File Attributes  : 0x20
File Name Length : 0xc
File Name Offset : 0x3c
FileName : test 1


Re: qqx with quotes

2020-02-26 Thread Tom Browder
On Wed, Feb 26, 2020 at 19:47 ToddAndMargo via perl6-users <
perl6-users@perl.org>
...

> Hmm, this don't [sic] work either:
>
> perl6 -e "my $proc=run( 'dir', 'test 1', :out ); my @RtnStr  = $$proc.
> out.slurp-rest.lines; for @RtnStr -> $Line { say $Line;}"


Todd, sloppy copy/paste or error with double dollar signs. What resulted?

-Tom


Re: qqx with quotes

2020-02-26 Thread ToddAndMargo via perl6-users

On 2020-02-26 15:37, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples shown 
I did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166



Hmm, this don't work either:

perl6 -e "my $proc=run( 'dir', 'test 1', :out ); my @RtnStr  = $$proc.
out.slurp-rest.lines; for @RtnStr -> $Line { say $Line;}"


Re: qqx with quotes

2020-02-26 Thread ToddAndMargo via perl6-users

On 2020-02-26 15:11, ToddAndMargo via perl6-users wrote:

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples shown I 
did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Opened

qqx not picking up quotes in Windows 7
https://github.com/Raku/problem-solving/issues/166


Re: qqx with quotes

2020-02-26 Thread ToddAndMargo via perl6-users

On 2020-02-26 15:06, Norman Gaywood wrote:
I don't have a windows system to test, but in all the examples shown I 
did not see:


qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.


That is the way I do it in Linux too.

$FileName works without the quotes if the file name does
not have any spaces in it.  With spaces, fsutil grips
about not finding the file and you sent one too many
parameters to it.

I will try the shell command


Re: qqx with quotes

2020-02-26 Thread Norman Gaywood
I don't have a windows system to test, but in all the examples shown I did
not see:

qqx{ C:/Windows/System32/fsutil.exe usn readdata "$FileName" };

which is how I would have expected to write the command.

On Thu, 27 Feb 2020 at 09:49, ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

>  > *From:* ToddAndMargo via perl6-users 
>  > *Sent:* Tuesday, February 25, 2020 11:12 AM
>  > *To:* perl6-users@perl.org 
>  > *Subject:* Re: qqx with quotes
>  >>> On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users
>  >>> mailto:perl6-users@perl.org>> wrote:
>  >>>
>  >>> Hi All,
>  >>>
>  >>> Windows 7
>  >>>
>  >>> In the following
>  >>>
>  >>> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
>  >>> \"$FileName\" }.lines;
>  >>>
>  >>>
>  >>> $FileName needs to be in quotes as it can have
>  >>> spaces in it.
>  >>>
>  >>>
>  >>> The following did not work:
>  >>>
>  >>> \"$FileName\"
>  >>> "$FileName\
>  >>> $FileName
>  >>>
>  >>> What am I doing wrong, this time?
>  >>>
>  >>> Many thanks,
>  >>> -T
>
>
> On 2020-02-26 14:16, Andy Bach wrote:
> > @Result = qqx { C:/Windows/System32/fsutil.exe usn
> > readdata \"$FileName\" }.lines;
> >
> > Doesn't windows do something special for files with spaces in them?  Hm,
> > $ type "hi mom" > "test 1"
> > $ dir test
> > $ dir "test 1"
> >
> > but, you're right, I couldn't find a combination of dbl, single, q, qq,
> > qqx, qx that'd let me run
> > dir "test 1"
> > via qqx or qx - windows is funny that way, I guess.
>
> Hi Andy,
>
> Thank you for the confirmation!  For once, it wasn't me.
> I wonder if this is a bug in Raku?
>
> I will try the Shell command.  No need for
> quotes in that.
>
> -T
>


-- 
Norman Gaywood, Computer Systems Officer
School of Science and Technology
University of New England
Armidale NSW 2351, Australia

ngayw...@une.edu.au  http://turing.une.edu.au/~ngaywood
Phone: +61 (0)2 6773 2412  Mobile: +61 (0)4 7862 0062

Please avoid sending me Word or Power Point attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


Re: qqx with quotes

2020-02-26 Thread ToddAndMargo via perl6-users

> *From:* ToddAndMargo via perl6-users 
> *Sent:* Tuesday, February 25, 2020 11:12 AM
> *To:* perl6-users@perl.org 
> *Subject:* Re: qqx with quotes
>>> On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users
>>> mailto:perl6-users@perl.org>> wrote:
>>>
>>> Hi All,
>>>
>>> Windows 7
>>>
>>> In the following
>>>
>>> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
>>> \"$FileName\" }.lines;
>>>
>>>
>>> $FileName needs to be in quotes as it can have
>>> spaces in it.
>>>
>>>
>>> The following did not work:
>>>
>>> \"$FileName\"
>>> "$FileName\
>>> $FileName
>>>
>>> What am I doing wrong, this time?
>>>
>>> Many thanks,
>>> -T


On 2020-02-26 14:16, Andy Bach wrote:
@Result = qqx { C:/Windows/System32/fsutil.exe usn 
readdata \"$FileName\" }.lines;


Doesn't windows do something special for files with spaces in them?  Hm,
$ type "hi mom" > "test 1"
$ dir test
$ dir "test 1"

but, you're right, I couldn't find a combination of dbl, single, q, qq, 
qqx, qx that'd let me run

dir "test 1"
via qqx or qx - windows is funny that way, I guess.


Hi Andy,

Thank you for the confirmation!  For once, it wasn't me.
I wonder if this is a bug in Raku?

I will try the Shell command.  No need for
quotes in that.

-T


Re: qqx with quotes

2020-02-26 Thread Andy Bach
 @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata \"$FileName\" 
}.lines;

Doesn't windows do something special for files with spaces in them?  Hm,
$ type "hi mom" > "test 1"
$ dir test
$ dir "test 1"

but, you're right, I couldn't find a combination of dbl, single, q, qq, qqx, qx 
that'd let me run
dir "test 1"
via qqx or qx - windows is funny that way, I guess.

From: ToddAndMargo via perl6-users 
Sent: Tuesday, February 25, 2020 11:12 AM
To: perl6-users@perl.org 
Subject: Re: qqx with quotes

>> On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users
>> mailto:perl6-users@perl.org>> wrote:
>>
>> Hi All,
>>
>> Windows 7
>>
>> In the following
>>
>> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
>> \"$FileName\" }.lines;
>>
>>
>> $FileName needs to be in quotes as it can have
>> spaces in it.
>>
>>
>> The following did not work:
>>
>> \"$FileName\"
>> "$FileName\
>> $FileName
>>
>> What am I doing wrong, this time?
>>
>> Many thanks,
>> -T

On 2020-02-25 08:29, Paul Procacci wrote:
> The following works on FreeBSD:
>
> my $fn = "file name";
> say qqx { ls -l "$fn" };
>
> Not sure why this would be any different on Windows.

What version are you running?


Re: qqx with quotes

2020-02-25 Thread Paul Procacci
Perl6 version 2019.03

On Tue, Feb 25, 2020 at 12:12 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> >> On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users
> >> mailto:perl6-users@perl.org>> wrote:
> >>
> >> Hi All,
> >>
> >> Windows 7
> >>
> >> In the following
> >>
> >> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
> >> \"$FileName\" }.lines;
> >>
> >>
> >> $FileName needs to be in quotes as it can have
> >> spaces in it.
> >>
> >>
> >> The following did not work:
> >>
> >> \"$FileName\"
> >> "$FileName\
> >> $FileName
> >>
> >> What am I doing wrong, this time?
> >>
> >> Many thanks,
> >> -T
>
> On 2020-02-25 08:29, Paul Procacci wrote:
> > The following works on FreeBSD:
> >
> > my $fn = "file name";
> > say qqx { ls -l "$fn" };
> >
> > Not sure why this would be any different on Windows.
>
> What version are you running?
>


-- 
__

:(){ :|:& };:


Re: qqx with quotes

2020-02-25 Thread ToddAndMargo via perl6-users
On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


Hi All,

Windows 7

In the following

@Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
\"$FileName\" }.lines;


$FileName needs to be in quotes as it can have
spaces in it.


The following did not work:

\"$FileName\"
"$FileName\
$FileName

What am I doing wrong, this time?

Many thanks,
-T


On 2020-02-25 08:29, Paul Procacci wrote:

The following works on FreeBSD:

my $fn = "file name";
say qqx { ls -l "$fn" };

Not sure why this would be any different on Windows.


What version are you running?


Re: qqx with quotes

2020-02-25 Thread Paul Procacci
The following works on FreeBSD:

my $fn = "file name";
say qqx { ls -l "$fn" };

Not sure why this would be any different on Windows.

On Mon, Feb 24, 2020 at 4:01 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> Hi All,
>
> Windows 7
>
> In the following
>
> @Result = qqx { C:/Windows/System32/fsutil.exe usn readdata
> \"$FileName\" }.lines;
>
>
> $FileName needs to be in quotes as it can have
> spaces in it.
>
>
> The following did not work:
>
> \"$FileName\"
> "$FileName\
> $FileName
>
> What am I doing wrong, this time?
>
> Many thanks,
> -T
>
>
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>


-- 
__

:(){ :|:& };: