The UNIX and Linux Forums  

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


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
512 Error while creating a directory shreyasjothish UNIX for Dummies Questions & Answers 11 04-17-2008 03:35 AM
extract tar files without creating directory here2learn UNIX for Dummies Questions & Answers 4 10-02-2006 04:42 PM
Creating alias for directory path jasjot31 UNIX for Dummies Questions & Answers 3 09-25-2006 05:04 AM
creating object files in a specific directory svh High Level Programming 1 02-13-2006 02:05 PM
creating a file on remote directory using sftp borncrazy Shell Programming and Scripting 1 07-11-2004 12:48 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Aug 2007
Posts: 18
creating directory error

i have create a Directory with "$@#$%" .
After creating a Directory, put ls command display "#$%" .
Why?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-03-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,323
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
  #3 (permalink)  
Old 09-04-2007
Registered User
 

Join Date: Aug 2007
Posts: 18
thanks

Quote:
Originally Posted by blowtorch View Post
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?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0