BASH shell expand arguments with spaces from variable [duplicate]
问题 This question already has answers here : Bash doesn't parse quotes when converting a string to arguments (4 answers) Closed 3 years ago . Say I have a variable $ARGS which contains the following: file1.txt "second file.txt" file3.txt How can I pass the contents of $ARGS as arguments to a command (say cat $ARGS , for example), treating "second file.txt" as one argument and not splitting it into "second and file.txt" ? Ideally, I'd like to be able to pass arguments to any command exactly as