Why does --text="$@" only pass the first word?

view full story

http://unix.stackexchange.com – When I run the following script with some arguments like arg1 arg2 arg3: #!/bin/bash zenity --entry --text="$@" zenity creates an entry dialog with this text: "arg1" whereas I expect "arg1 arg2 arg3" If I use a variable like the following script it shows all arguments for the entry text. #!/bin/bash text="$@" zenity --entry --text="$text" Whats the difference between these scripts? Why the first one replaces $@ with the first argument only? (HowTos)