Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
piping 'progress' command lines to 'sudo sh'
I routinely use an idiom like:
echo 'progress -ezf $file $cmd $args ...'
often in a 'for' loop and pipe the series of commands to a root shell
run with 'sudo sh -v'.
For a while now, 'progress' "progress bar and statistics" has stopped
displaying.
It seems to have begun after some update to 10.0_BETA (and probably
-current, although I don't usually run those commands on a -current
system).
I've checked various invocations and all work properly except piping to
a shell run with 'sudo sh'. (Using "-v" is not material to the failure,
just for feedback as to what command is being run.) The target userid
doesn't matter either, just that "root" is what I usually need to be
when running the command. Maybe something changed in 'sudo' as 'su root
-v' works as expected. One could just as easily use 'sudo -u otheruser
sh -v' and see the failure or 'su otheruser -v' and see success.
Working example:
$ gzip -c /etc/printcap > /tmp/printcap.gz
$ echo "progress -ezf /tmp/printcap.gz cat > /tmp/printcap" | sh -v
Non-working example:
$ gzip -c /etc/printcap > /tmp/printcap.gz
$ echo "progress -ezf /tmp/printcap.gz cat > /tmp/printcap" | sudo sh -v
I haven't yet updated 'sudo' on my two remaining netbsd-9 systems, so
I'll see how it behaves for comparison.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index