Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I'm trying to replace bash with psh, and fortunately it's no problem to call directly programms in Path.

But how do I simply pass a variable as a parameter?

psh% option echo=0 psh% $url='www.google.com' psh% wget $url : Nicht unterstütztes Schema. [1] Error 5437 wget $url psh% wget "$url" : Nicht unterstütztes Schema. [1] Error 5438 wget "$url" psh% wget '$url' --00:35:33-- http://$url/ => `index.html' Auflösen des Hostnamen »$url«.... fehlgeschlagen: Name or service not +known. [1] Error 5439 wget '$url'
"Nicht unterstütztes Schema." means "not supported scheme..."

a direct call with literal URL works as expected...

Replies are listed 'Best First'.
Re: calling commands with psh
by LanX (Saint) on Feb 01, 2009 at 23:50 UTC
    Backticks work ...
    psh% $url="www.gmx.de" psh% `wget $url` --00:49:08-- http://www.gmx.de/ => `index.html'

    Cheers Rolf