help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing the output of an external cmd from inside a loadable built


From: Chet Ramey
Subject: Re: accessing the output of an external cmd from inside a loadable builtin
Date: Wed, 6 Jul 2022 09:42:56 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 7/1/22 11:51 AM, bobg@junga.com wrote:
> 
> 
> Inside my builtin, I want to execute a 'find' command and process the
> results. I have been looking at the execute_cmd.c file. I have been using
> execute_shell_function for other commands but I am not sure how I should do
> it so that I can access the output of the find command in the builtin code.
> There's probably multiple ways to do it.  Can anyone suggest a good approach?

Look at subst.c:command_substitute() and how param_expand() calls it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]