This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Command substitution


Sorry. But it's not the path.
This doesn't work also on a win98 system:

1|Picture=greta_08.jpg
2|identify.exe $Picture
3|PicWidth=`identify.exe $Picture; `
4|echo "Picture With: $PicWidth !"
5|echo "That's it."

Now identify.exe is available via PATH and the Picture is in my
home-dir.
Line 2 prints out on line with some information about the picture (name,
type, dimensions, etc.)
In line 3 identify.exe is executed. I can see it in the window-title.
However, the variable remains empty.

I can change the line to
3|PicWidth=`identify.exe -verbose $Picture `
Now a lot of information about the picture is printed via line 4.

Axel

Lapo Luchini wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Axel Grobe wrote:
> 
> | # Here is the script: BASE=D:/WebSites/abc-def.de/web
> | IDENTIFY=C:/Programme/ImageMagick-5.5.7-Q16/identify.exe
> 
> The time you installed cygwin you knew what'd you want and get with
> cygwin, don't you? ^_^
> In a POSIX environment a path like "D:/WebSites/abc-def.de/web" means
> "directory D, then directory /WebSites/abc-def.de/web"
> 
> You can have the effect you wanted using the auto-mounter cygdrive mounts.
> 
> BASE=/cygdrive/d/WebSites/abc-def.de/web
> IDENTIFY=/cygdrive/c/Programme/ImageMagick-5.5.7-Q16/identify.exe
> 
> - --
> Lapo 'Raist' Luchini
> lapo@lapo.it (PGP & X.509 keys available)
> http://www.lapo.it (ICQ UIN: 529796)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (Cygwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAj9/3ssACgkQaJiCLMjyUvsr9wCgnXXuyVQi+vd8ppm601hbpN0b
> yJUAoLTECKQmnl936XX6R3wXKPHeuVaR
> =ycLL
> -----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]