Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-c behavior only execs immediately subsequent arg #158

Closed
nuclearmistake opened this issue May 29, 2013 · 1 comment
Closed

-c behavior only execs immediately subsequent arg #158

nuclearmistake opened this issue May 29, 2013 · 1 comment

Comments

@nuclearmistake
Copy link

With SuperSU's su: [CODE]su -c make me a sandwich[/CODE] makes me a sandwich.
To make a sandwich with the included su: [CODE]su -c "make me a sandwich"[/CODE]

Would be nice if either worked.
I'll wrap my head around the arg handling and pull request this modification if I find time to.

You the man, Koush

@koush
Copy link
Owner

koush commented May 29, 2013

I am fairly sure the latter is correct. From man pages on my desktop, note the multiword example requires quotes:

EXAMPLES
     su man -c catman
            Runs the command catman as user man.  You will be asked for man's password unless your real UID
            is 0.
     su man -c 'catman /usr/share/man /usr/local/man'
            Same as above, but the target command consists of more than a single word and hence is quoted for
            use with the -c option being passed to the shell.  (Most shells expect the argument to -c to be a
            single word).

@koush koush closed this as completed May 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants