[Glass] Execution a simple "cp command ...
Mariano Martinez Peck via Glass
glass at lists.gemtalksystems.com
Thu Jun 11 12:21:58 PDT 2015
Can't you use:
System performOnServer: 'cp /hola.txt /bye.txt'
?
On Thu, Jun 11, 2015 at 4:12 PM, itlists at schrievkrom.de via Glass <
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
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150611/ce083f3b/attachment.html>
More information about the Glass
mailing list