[platypus-dev] Re: Bug with '$1' variable in Platypus 3.2?
- From: Sveinbjorn Thordarson <sveinbt@xxxxx>
- To: platypus-dev@xxxxxxxxxxxxx
- Date: Thu, 3 Nov 2005 19:12:43 +0000
Platypus passes the *actual* path to the script via $1, which may
happen to contain spaces and special characters. Escaping spaces is
just a method for telling the shell that you want a special character
like space to be interpreted as part of a string and not as a
separator for arguments.
Cheers,
Sveinbjorn Thordarson
On Nov 3, 2005, at 7:02 PM, Tony Thomson wrote:
Hi,
I just found Platypus, and am having some fun with it. However,
I've run into a problem.
I believe the $1 variable, which is supposed to hold the path to
the current directory has a bug.
If the current path contains folders with a space in their name,
the $1 variable doesn't contain the escape character for spaces.
Example:
My path is:
/Tools/OpenGL Tools/current/
$1 contains:
"/Tools/OpenGL Tools/current/
$1 should contain:
"/Tools/OpenGL\ Tools/current/
Because #1 doesn't contain the escape character, using it in a
script doesn't work.
The shell looks for:
/Tools/OpenGL
Am I just doing something wrong? If this is indeed a bug, any
chance it can go on the list for 3.3?
Thanks,
Tony Thomson
- References:
- [platypus-dev] Bug with '$1' variable in Platypus 3.2?
- From: Tony Thomson
Other related posts:
- » [platypus-dev] Bug with '$1' variable in Platypus 3.2?
- » [platypus-dev] Re: Bug with '$1' variable in Platypus 3.2?
- » [platypus-dev] Re: Bug with '$1' variable in Platypus 3.2?
- » [platypus-dev] Re: Bug with '$1' variable in Platypus 3.2?
Hi,
I just found Platypus, and am having some fun with it. However, I've run into a problem.
I believe the $1 variable, which is supposed to hold the path to the current directory has a bug.
If the current path contains folders with a space in their name, the $1 variable doesn't contain the escape character for spaces.
Example: My path is: /Tools/OpenGL Tools/current/
$1 contains: "/Tools/OpenGL Tools/current/ $1 should contain: "/Tools/OpenGL\ Tools/current/
Because #1 doesn't contain the escape character, using it in a script doesn't work.
The shell looks for:
/Tools/OpenGL
Am I just doing something wrong? If this is indeed a bug, any chance it can go on the list for 3.3?
Thanks, Tony Thomson
- [platypus-dev] Bug with '$1' variable in Platypus 3.2?
- From: Tony Thomson