Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Anyone using gsutil?

by Anonymous Monk
on Mar 09, 2013 at 23:44 UTC ( #1022629=note: print w/ replies, xml ) Need Help??

in reply to Anyone using gsutil?

Capture::Tiny ought to work

my ($stdout, $stderr, $exit) = capture { system( $cmd, @args ); };

Comment on Re: Anyone using gsutil?
Download Code
Replies are listed 'Best First'.
Re^2: Anyone using gsutil?
by johnfl68 (Beadle) on Mar 10, 2013 at 07:00 UTC

    Thanks for the Capture::Tiny suggestion.

    Actually, I just found a what seems to be unpublished option for GSUTIL that works for only the cp command. There is a -q switch. Why this isn't better documented, I don't know.

    So, you can use this:

    $cmd = "gsutil cp -q -a public-read $localfile gs:// +mpdirectory/$filehash.png"; system $cmd;

    And you will not get output. I still am not sure if this will output warning dialog though, if there was a issue.

    Unfortunately it only works with the cp (copy) and not other commands like rm.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022629]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2016-02-08 23:30 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (290 votes), past polls