[sudo-users] sudo and shell scripts.
Vitezslav Cizek
vcizek at suse.cz
Fri Apr 12 04:22:35 MDT 2013
Hello,
* Dne Pátek 12. duben 2013, 09:13:40 [CEST] Gary.Haden at saga.co.uk napsal:
>
> Hi,
>
> We have a script that runs as root fine but when we run as another user and
> - sudo -u root <script> we get -
>
> /saga/bin/env_create/createTIAUser.shl: syntax error at line 61:
> `DBUSERNAME=$'
> unexpected
>
> Line 61 is DBUSERNAME=$(echo $DBUSERNAME | tr '[a-z]' '[A-Z]')
>
Doesn't have the root user a different shell?
For example, bourne shell doesn't support $(), I think.
Do you have a shebang at the beginning of your script?
--
Vita Cizek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: </pipermail/sudo-users/attachments/20130412/4ea22857/attachment.bin>
More information about the sudo-users
mailing list