Would
sudo (cat foobar.img > /dev/sdi)
Work? sudo (cat foobar.img > /dev/sdi)
Work? sudo sh -c "cat foobar.img > /dev/sdi"
or sudo -s "cat foobar.img > /dev/sdi" sudo sh <<EOF
cat foobar.img > /dev/sdi
EOFIn short, you could do it, but it'd be ripped out of every server that's been hardened, and for users that don't want to care - they're just running 'sudo su' anyhow.
Speaking only for myself, the thought of my shell having a magical escalation process would scare the bejeezus out of me - and I'm supposed to have root on our boxes!
zsh: parse error near `)'
Is it just ignoring the parentheses? Does the redirection "take precedence" over parentheses and brackets?