On 2023-04-28 at 20:36, Greg Wooledge wrote: > On Fri, Apr 28, 2023 at 08:00:02PM -0400, The Wanderer wrote: > >> I would suspect that >> >> $ sudo 'echo 123 > /root/123.txt' >> >> would produce the effect you're after, but as I don't have sudo >> installed, cannot verify that myself. > > No, that won't work. It'll try to execute a program named 'echo 123 > > /root/123.txt' which is really, really unlikely to exist in your > current working directory.
That was the other possibility, the existence of which which was the reason why I couched this in terms so far from certainty. The need to invoke a shell around them was also a possibility I considered, but I didn't want to rewrite the post three more times trying to express that too without also adding so much more complexity as to make the thing unreadable. You managed it all much more concisely and helpfully than I had done. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature