i have create a Directory with "$@#$%" .
After creating a Directory, put ls command display "#$%" .
Why?
From the man page of bash,
Special Parameters
The shell treats several parameters specially. These param-
eters may only be referenced; assignment to them is not
allowed.
@ Expands to the positional parameters, starting from
one. When the expansion occurs within double quotes,
each parameter expands to a separate word. That is,
"$@" is equivalent to "$1" "$2" ... When there are no
positional parameters, "$@" and $@ expand to nothing
(i.e., they are removed).
Your $@ is being "expanded to nothing". If you want to see how it works, run "set -x" and then run your mkdir command. You will then see that the mkdir command gets only "#$%" as args.
Run this in csh. "Variable syntax".
blowtorch:
From the man page of bash,
Your $@ is being "expanded to nothing". If you want to see how it works, run "set -x" and then run your mkdir command. You will then see that the mkdir command gets only "#$%" as args.
Run this in csh. "Variable syntax".
thank you for your kind reply.
do u tell me what is set -x?