我正在寻找一种将数据传输到gsutil cp中的方法:
echo '<html>foobar</html>' | gsutil cp --stdin gs://my-bucket/foo
-I
选项用于读取文件路径,而不是数据。gsutil help cp
说:
https://gist.github.com/ORESoftware/566d9c3d00e3858c1161ae9b741fc07e
是的,我正在寻找一种通过stdin将文件发送到GS的方法。
看起来像使用-
一样起作用:
echo '<html>foobar</html>' | gsutil cp - gs://my-bucket/foo
我认为,--stdin
标志会更明确和更可取。