The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-18-2008
zouhair zouhair is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 12
If you have a file named "this$file" (the $ is part of the name), and you want to handle it with a shell you have to remove its special meaning for the shell (it is used to exctract variable data for example) by preceding it by a \

Code:
pobo@intrepid /tmp $
 touch 'this$file'

pobo@intrepid /tmp $
 ls thi*
this$file

pobo@intrepid /tmp $
 rm this$file
rm: cannot remove `this': No such file or directory

pobo@intrepid /tmp $
 rm this\$file
rm: remove regular empty file `this$file'? y

pobo@intrepid /tmp $