In a shell script, my understanding is that "$@" expands to the script arguments, quoting them as needed. For instance this would properly forward the script arguments to gcc: gcc -fPIC "$@" When using the bash pass-to-stdin syntax `<<<` though, "@$" doesn't work as I would expect it to. #!/bin/bash cat <<< "$@" Calling the script as `./test.sh foo "bar baz"` gives foo bar baz I would expect foo "bar baz" Is there a way to write a shell script that prints it's arguments as you would write them on the shell prompt? For instance shell script that gives a hint as to what command to run with its arguments included.