bash - Using a variable containing spaces as a single argument -


Think that you have a variable that has a string of text with spaces and you want to use it as That the input arguments for another script.

  VAR1 = Hello \ world # ... can you go about passing the variable content without worrying about the variable?  

Some more ./a_script.sh $ VAR1

double Use quotes:

  VAR1 = hello \ world # ... do something else ./a_script.sh "$ VAR1"    

Comments