[Glass] Execution a simple "cp command ...
itlists@schrievkrom.de via Glass
glass at lists.gemtalksystems.com
Thu Jun 11 12:31:11 PDT 2015
Yes, that could be done ... but why does the other stuff not work or
better: how is it used ?
Marten
Am 11.06.2015 um 21:21 schrieb Mariano Martinez Peck:
> Can't you use:
>
> System performOnServer: 'cp /hola.txt /bye.txt'
>
> ?
>
> On Thu, Jun 11, 2015 at 4:12 PM, itlists at schrievkrom.de
> <mailto:itlists at schrievkrom.de> via Glass
> <glass at lists.gemtalksystems.com <mailto:glass at lists.gemtalksystems.com>>
> wrote:
>
> ... seems to e pretty difficult ...
>
> I tried stuff like:
>
> GsHostProcess>>mskCopyFile: source to: target
> | aGsHostProcess output aWriteStream |
>
> aWriteStream := WriteStream on: String new.
> aWriteStream
> nextPutAll: '/bin/bash -c ' ;
> nextPut: $' ;
> nextPutAll: 'cp ' ;
> nextPut: $" ;
> nextPutAll: source asString ;
> nextPut: $" ;
> space ;
> nextPut: $" ;
> nextPutAll: target asString ;
> nextPut: $" ;
> nextPut: $' .
>
> Transcript cr ; show: aWriteStream contents.
>
> aGsHostProcess := GsHostProcess fork: aWriteStream contents.
> ....
>
> When executing stuff like
>
> GsHostProcess
> mskCopyFile: '/var/www/fileswebcati/customers/test.txt'
> to: '/var/www/fileswebcati/customers/test2.txt'
>
> the following command is printed on the Transcript:
>
> /bin/bash -c 'cp "/var/www/fileswebcati/customers/test.txt"
> "/var/www/fileswebcati/customers/test2.txt"'
>
> executing it in a real shell: everything is ok.
>
> So: anyone telling me, how a simple "cp" can be executed under
> Gemstone ...
>
>
> Marten
>
>
> --
> Marten Feldtmann
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
--
Marten Feldtmann
More information about the Glass
mailing list