Re: Useful bash scripts for wine / need help

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

 



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









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

  Powered by Linux