On Wed, Dec 04, 2024 at 08:13:29PM +0000, Colin Watson wrote:
> On Wed, Dec 04, 2024 at 06:47:58PM +0000, Mark Hindley wrote:
> > On Wed, Dec 04, 2024 at 06:10:23PM +0000, Mark Hindley wrote:
> > > I think using awk might work well here. Suggested patch attached.
> >
> > Or not, apparently RS='\0' is not portable.
>
> Well, I have a nagging feeling that I'm missing something much simpler,
> but if you don't mind relying on perl (ucfq is already written in perl),
> then I think this works:
If we use perl we can just do
perl -e 'print "$_\n" for keys %ENV;'
or the same in awk (which might be faster?)
awk 'BEGIN{for(v in ENVIRON) print v}'
Mark