then when the wrapper script runs binary_app $OPTS, the file name with spaces gets split up and binary_app sees the filename parts as different arguments.

Here are some of my requirements:1) I don't know what arguments binary_app takes but the user does. binary_app may take more arguments in the future.2) The user must be able to specify -flag to wrapper_script, wrapper_script must get rid of this flag before passing the rest of the arguments on to binary_app, and it must perform other actions when -flag is detected.3) I cannot change binary_app.4) Filename parameters to wrapper_script.sh with spaces in them must be supported.

I suppose I could loop through every paramter until I find -flag, delete it, recombine the parameters, and then pass them off to binary_app. It seems like there should be a more elegant way, though.

Who is online

Users browsing this forum: Google [Bot] and 11 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum