Re: WINE fails in directories with Question Marks in name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-09-12 at 16:58 -0500, stvs wrote:
> > You can escape a character to remove its special properties or
> > enclose the string containing it in single quotes.
> 
> 
> Great, but how do I do that when I'm in a DIRECTORY that contains a special character? This is how this problem arises: there is a directory called 'foo?' in which there is the file bar.mpg. This fails:
> 
> $ cd 'foo?'
> $ wine cmd.exe bar.mpg
> 
> WINE is unable to operate within the directory named 'foo?'. There is
> no way for me to escape the directory's name in the (scripted) call to
> wine.
> 
Try this (tested, saved as xtest and made executable):

<code>
#!/bin/bash
y=$(echo "$1" | sed -e 's/\?/\\?/')
echo "y=$y"
</code>

$ xtest foo?
y=foo\?

so the following should work too:

#!/bin/bash
y=$(echo "$1" | sed -e 's/\?/\\?/')
cd "$y"
wine cmd.exe bar.mpg

Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux