Passing "current dir" to linux program (or other ways to associate it)

Rein Klazes rklazes at
Sun Mar 7 02:15:00 CST 2004

On Sun, 07 Mar 2004 02:42:09 +0300, you wrote:

> #!/bin/sh
> env TEMP=/tmp TMP=/tmp acroread /path/to/pdf/files/$1
> It's because Windows passes only the filename, and the directory is
> supposedly "current". As I don't know of a way to get the "current" dir,
> all I could do was fix the path.

You can use $(pwd) here (pwd = print working directory): 

acroread $(pwd)/$1

Actually in general it is better to use winepath (included tool with
wine) as it does conversion of DOS style paths (C:\program files\blabla)
as well. 

acroread $(winepath $1) 

Rein Klazes
rklazes at

More information about the wine-users mailing list