In a shell script, my understanding is that $@ expands to the script arguments, quoting them as needed. For instance this forwards 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/bashcat <<< $@Calling the script as ./test.sh foo bar baz givesfoo bar bazI would expectfoo bar bazIs there a way to write a shell script that prints it's arguments as you would write them on the shell prompt? For instance: a hint as to what command to use next, including the script arguments in the hint.
Can a shell script prints its argument, quoted as you would write them on the shell prompt?
bash;shell script;quoting;arguments