Comment on Podman: Issues with multiple users running containers simultaneously
forbiddenlake@lemmy.world 2 weeks ago Note that sudo echo does not work as non root because the shell redirection is attempted before the command runs. You want echo foo | sudo tee -a /bar instead
glizzyguzzler@piefed.blahaj.zone 2 weeks ago
So the sudo echo does echo as sudo but doesn’t carry over? Makes sense damn I hate bash! Any way to keep the >>? Or do you need to tee? Cause the >> is pretty cool
frongt@lemmy.zip 2 weeks ago
That’s the thing about computers, they do exactly what you tell them.
sudo echoworks, but the pipe and the redirect are interpreted by the bash shell you’re in, which isn’t being run with sudo.You should also know that echo is a bash shell builtin, so the echo you’re running with
echoandsudo echoare two very different things.