On 11/15/2017 09:53 AM, Stef Walter wrote:
> Wildcards are expanded by a shell, so you want:
>
> On 15.11.2017 15:43, Mark Reynolds wrote:
>> Basically if I try to use wildcards or pipes things seem to break:
>>> var cmd = ["/usr/bin/ls", "/etc/dirsrv/slapd-*"];
> var cmd = ["/bin/sh", "-c", "/usr/bin/ls /etc/dirsrv/slapd-*"];
>
> Hope that helps,
Thank you sir!
>
> Stef
>
>> cockpit.spawn(cmd, { superuser: true }).done(function(data) {
>> insts = new String(data);
>> $("#Title").text(data); }
>> ).fail(function(error){
>> $("#Title").text(error);
>> });
>>
>>
>> I get this error response: "/usr/bin/ls exited with code 2"
>>
>> I get the same error when trying this:
>>
>> var cmd = ["/usr/bin/ls", "/etc/dirsrv/", "|", "/usr/bin/grep",
>> "slapd"];
>>
>> But this works fine:
>>
>> var cmd = ["/usr/bin/ls", "/etc/dirsrv/"];
>>
>>
>> Is this a bug, or do I need to do something different?
>>
>> Thanks,
>>
>> Mark
>>
>> _______________________________________________
>> cockpit-devel mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>>
> _______________________________________________
> cockpit-devel mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
_______________________________________________
cockpit-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]