[Glass] Execution a simple "cp command ...
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Thu Jun 11 12:56:55 PDT 2015
Marten,
At first blush, I agree that this should work ... checking with others
in engineering to get the real skinny on GsHostProcess ...
Dale
On 06/11/2015 12:12 PM, itlists at schrievkrom.de via Glass 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
>
>
More information about the Glass
mailing list