Skip to content

Files

Latest commit

3bf10d5 · Sep 9, 2020

History

History
46 lines (33 loc) · 1.01 KB

privileged.md

File metadata and controls

46 lines (33 loc) · 1.01 KB

Privileged command

Run a privileged command (command in elevated shell).

ls -l

Testing privileged commands with stream.

echo "hello" && sleep 9 && echo "9 seconds later" && echo "end"

Testing privileged commands with stream and stderr.

echo "hello error" >&2 && sleep 3 && echo "3 seconds later" >&2 && echo "end error" >&2

Extreme stream.

wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz --show-progress --progress=bar:force

Testing privileged, pwd.

pwd

Testing normal command, pwd

pwd

Testing variable expansion.

FOO="$(echo 'vars')"; echo $FOO

Testing variable expansion (privileged)

FOO="$(echo 'vars')"; echo $FOO