Hi Stéphane,
I believe the cockpit.script() function does what you're looking for. In
particular, variable interpolation spawning a unix shell and treating your
command line as a "script":
https://cockpit-project.org/guide/latest/cockpit-spawn.html#cockpit-spawn...
Does something like this work?
var script = cockpit.script("yum list kernel-devel-$(uname -r)");
Cheers,
Stef
On Thu, Jan 28, 2021 at 12:10 PM Stéphane List <stephane.list(a)gmail.com>
wrote:
Hello,
I would like to spawn the following command line:
yum list kernel-devel-$(uname -r)
When I try, it seems that "uname -r" is not transformed to 4.18.0-240....
Can I spawn a bash ? Or should I first get the result of "uname -r" in a
variable that I could concatenate to the rest of the line to have the final
result ?
Thanks for your help
_______________________________________________
cockpit-devel mailing list -- cockpit-devel(a)lists.fedorahosted.org
To unsubscribe send an email to cockpit-devel-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/cockpit-devel@lists.fedoraho...
--
Stef Walter (he / his)
Linux Engineering
Red Hat