in reply to Re^2: sudo ignoring string entry after first space encountered
in thread sudo ignoring string entry after first space encountered

where SuoENV.ksh is a bash shell script

So are you using $* in your script where you should be using "$@" ?

$ cat wrapper #!/bin/bash perl -le'print for @ARGV' $* perl -le'print for @ARGV' "$@" $ ./wrapper foo "a b c" foo a b c foo a b c

- tye        

Replies are listed 'Best First'.
Re^4: sudo ignoring string entry after first space encountered ("$@")
by perl197 (Novice) on Apr 15, 2015 at 17:01 UTC

    Thank-you much for your response(s). In theory this should address the symptom and had been recommened from other quarters. However it was to no avail. I changed the script to read the where clause from a file, rather than command line entry, which gets me over the hump for the time being. I'm still in persuit of a pure solution as I suspect this will crop up again.

      Then perhaps you are parsing the arguments (in your shell script) and using things like $1 instead of "$1"?

      - tye        

      If passing the string via a file proves to be the only workable option for you, you could write a script that saves the string to a file, then runs the sudo command. This would simplify the users' interactions with your current script.