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-script 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 <[email protected]> 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 -- [email protected] > To unsubscribe send an email to [email protected] > 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/[email protected] > -- Stef Walter (he / his) Linux Engineering Red Hat
_______________________________________________ cockpit-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected]
