it replaces this string with the actual value of the variable parameters, thensince the expansion is unquoted, the whole string resulting from it gets splitinto multiple words according to each character presents in the value of thethe shell variable IFS, that defaults to <space><tab><newline>.

As you can see, this is not what you want, hence it doesn't behave like you want it to. (« not working »)

After reading that explanation, you might now decide to quote « $parameters », butdoing so would result in the string being passed to executable as only one argument.

So that won't help, because you want each word to be expandedseparately to make executable see multiple arguments, not one.

The best workaround to this in bash(1) is the use of array variables.

Thanks to them, you can store multiple elements in one variable, that,when expanded using the @ pattern - in a quoted variable expansion -will cause all elements to be expanded separately, resulting in multiplequoted words that won't get word split because, again, they get quoted.

Who is online

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