How to pass filename with accent and spaces as parameter to shell script file

2

I densenvolvi a shell script that receives the location of a file and makes various manipulations on it, eg: ./processa.sh path / file.txt

But when I send a file name as a parameter that contains spaces, it gives error, because it places '\' in each space, and is interpreted by bash as a directory. Ex: path / filename.txt Output: path / name \ of \ file.txt

How to avoid this?

    
asked by anonymous 16.09.2014 / 01:58

1 answer

0

The output was to use double quotation marks as Wakim and Antonio mentioned, so I am marking the issue as resolved.

    
16.09.2014 / 04:33