Drive by Unix comments below.
On 8/11/22 9:15 AM, Chen, Ya-Fang wrote:
echo 'date' ! su ;
echo 'mkdir -m 755 /home/y000001' ! su ;
echo 'mkdir -m 755 /home/y000001/.ssh2' ! su ;
echo 'chown -R y000001:agroup /home/y000001' ! su ;
Is there a reason that you are echoing commands into su's STDIN verses
passing the command to su directly? E.g.
su -c 'date'
su -c 'mkdir -m 755 /home/y000001'
su -c 'mkdir -m 755 /home/y000001/.ssh2'
su -c 'chown -R y000001:agroup /home/y000001'
My experience is that explicitly specifying things works out better than
implicitly piping things into STDIN.
--
Grant. . . .
unix || die
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN