> On 4 Aug 2022, at 10:35, Marc Chantreux <m...@unistra.fr> wrote:
> 
> hello people,
> 
> I found myself choosing between
> 
> raku -e '
>       (run :out, <
>               dpkg-query -f ${db-fsys:Files} -W gnuplot*
>       > ).out>>.lines>>.trim>>.grep(*.IO.f)>>.say'
> 
> and
> 
> raku -e '
>       qx<
>               dpkg-query -f \${db-fsys:Files} -W gnuplot\*
>       >.lines.trim>>.grep(*.IO.f)>>.say'
> 
> I really love the qx syntax but
> 
> * it runs an extra useless sh processus
> * I need to quote the shell symbols
> 
> I read the Proc documentation and tried to see if there was another
> command or an adverb to the qx construction (something like :r for run).
> 
> What I really would like to write is:
> 
> raku -e ' qx:r< dpkg-query -f ${db-fsys:Files} -W gnuplot* 
> >.lines>>.grep(*.IO.f)>>.say '

I believe you could use App::Rak for that:


    $ zef install App::Rak
    $ dpkg-query -f ${db-fsys:Files} -W gnuplot* | rak '*.trim.IO.f' 
--/show-line-number


Liz

Reply via email to