-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Xiaoqiang Zheng on 6/10/2009 3:46 AM:
> # su - oracle<<EOF
>> LANG=C
>> i=bin
>> /$i/hostname
>> EOF

This is shell quoting bug on your part, unrelated to coreutils; you may
want to ask on a more appropriate forum.  You need to quote your here-doc
or provide escaping for the $ if you want the $ to be a literal part of
the script fed through su, rather than being interpreted by the shell
prior to the spawning of su.  In other words, one of these two approaches:

# su - oracle<<\EOF
LANG=C
i=bin
/$i/hostname
EOF

# su - oracle<<EOF
LANG=C
i=bin
/\$i/hostname
EOF

- --
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkovoZsACgkQ84KuGfSFAYBe1wCgvbj8Y5nVozWhS5sO1Kbt434H
9s0An0nKSgjugjmDtES5xI0+k64IqSzk
=ygCE
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to