On Wed, Dec 04, 2024 at 04:29:44PM +0000, Colin Watson wrote:
> Perhaps something like this approach would help:
> 
>   for env in $(env -0 | cut -z -d= -f1 | xargs -0); do
>       case "$env" in
>           ...
>       esac
>   done
> 
> ... but I haven't really tested this and it certainly needs some careful
> review.

Worth noting: while I often use xargs like this for local debugging, I'm
not certain that it's totally safe against weird characters in its
input.  You may want to use some other arrangement for iterating over
NUL-separated output.

-- 
Colin Watson (he/him)                              [[email protected]]

Reply via email to