[Wine] Re: Useful bash scripts for wine / need help

vitamin wineforum-user at winehq.org
Sat May 8 12:53:14 CDT 2010


landeel wrote:
> The problem is both scripts will fail if there are any spaces in the filename or in the path name. Spaces in filenames are evil!

You have few issues with your scripts:
1. Don't use readlink - you don't need to dereference symlinks yourself
2. $@ expands into list of arguments, not one argument. So you do need to use $1 instead. Or merge all of them (see below)
3. Make sure you quote filename passed to your scripts eg:

Code:
wine-extracticon "file name with spaces"


4. Use variables

A simple workaround for 2 & 3 is:

Code:

FILE=$1
shift
for i in $@; do FILE="$FILE $i"; done










More information about the wine-users mailing list