Search code examples
linuxscriptingksh

Handling & symbol in filename


There is a "&" symbol in one of the files' name.

If I try to use mv command, I'm not able to correctly get the file name.

Actual filename :

abc&def.xls 

mv command:

 mv $home/abc&def.xls $enter/abc&def.xls

But I'm getting an error like this :


mv : missing file destination operand after $home/abc


Please suggest how to go ahead with moving the file to different destination?


Solution

  • I just escaped the ampersand and it worked:

    mv abc\&def.xls ..
    

    Good luck