what is the difference between $1 and “$1” in bash script? [duplicate]
what is the difference between $1 and “$1” in bash script? [duplicate] This question already has an answer here: example while [ -n "$1" ] do something done can i write $1 instead of "$1" ? And what is the difference between user=alexander and user="alexander" ? Thanks $1 "$1" user=alexander user="alexander" This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. The shell does substantially more processing on unquoted strings than on quoted ones (not just splitting them up on whitespace or characters in IFS, but also expanding each of the post-split components as a glob) -- and in 99% of cases that processing is undesired. Missing quotes are probably responsible for more BashPitfalls entries than any other single class of error. – Charles Duffy Jun 30 at 3:33 ...
