The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-03-2007
blowtorch's Avatar
blowtorch blowtorch is offline
Supporter
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,332
From the man page of bash,

Quote:
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".
Reply With Quote