On Tue, Dec 29, 2015 at 9:01 AM, Peter Hunkeler <[email protected]> wrote:
> <snip>
>
> To run commands in a "su" shell environment, you have to write all the
> commands into a UNIX file first, and then call "su" by redirecting stdin to
> that UNIX file.
>
>
> echo "id" > /tmp/sucommandfile
> su < /tmp/sucommandfile
>
>
The following also works:
$
{ cat <<EOF
> id
> whoami
> EOF
> } | su
uid=0(
ROOT
) gid=1000(
<elided>
) groups=2000(
<elided>
),0(SYS1)
ROOT
$
--
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning
Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.
Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.
He's about as useful as a wax frying pan.
10 to the 12th power microphones = 1 Megaphone
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN