Re: shell expansion (globbing) from inside php cli script

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

 



Brian,

Can you post more of the script?

--Bob

Brian V Bonini wrote:
On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote:


$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' .
$files . '} ' . $tmp_dir . '/';

That should work

On 6/27/05, b-bonini@xxxxxxx <b-bonini@xxxxxxx> wrote:

Can not make this work inside a php script.

Have tried several variations:
$cmd = "scp $user@stagingcws.$tld:$directory/\{$files} $tmp_dir/.";

$cmd = "scp $user@stagingcws.$tld:$directory/" . '{' . $files . '} ' . "$tmp_dir/.";

etc...

I can echo out the command and get a well formed command, i.e. one that will execute from a command prompt, but when I try to exec() $cmd from within the script the globbing is taken literally.



No, I already tried it that way too. I guess I should mention this is a
cli script if that matters.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux