> On Tue, Feb 13, 2024 at 09:47:38PM +0100, Franco Martelli wrote: >> ~# LC_ALL=C apt install >> [... works on ...] all shells other than bash? csh, korn, dash, zsh ...
* Greg Wooledge <g...@wooledge.org> [24-02/13=Tu 15:59 -0500]: > [...] all the Bourne family shells [...] > > In csh, you need to use env. Like this: > > % env LC_ALL=C apt install > > This works in all shells, at the cost of being slightly less efficient. * Nicolas George <geo...@nsup.org> [24-02/13=Tu 22:04 +0100]: > No, ( setenv var something ; command ) works with csh. What Greg posted also works, because it's an invocation of the 'env' command, not csh syntax. What you posted also works, but it runs the command in a subshell of csh, so I doubt it gains efficiency over running the command under env.