Hi!
I appreciate the feedback that I was vague.
Thank you (very much) for your time.
Here's my input and output for the two cases described in my
original post:
Case A)
---------
$ su -
<entered password>
# cd /etc
# sed -e 's/A/B/' < motd.ORIG > motd
#
It works! (writes file "/etc/motd" which is inside root owned
directory and file also has root ownership)
Case B)
---------
$ cd /etc
$ sudo sed -e 's/A/B/' < motd.ORIG > motd
-bash: ./motd: Permission denied
It Fails.
##
I really need this to work via sudo as this one step
is part of a larger script. I do not see my problem.
Thank you for any hints.
-D