Hey,
would be nice to transfer files with azcopy which are read by STDIN, like:
cat MYFILE | azcopy cp "https://myaccount.blob.core.windows.net/mycontainer/1file.txt?sastokenhere"
This is already implemented in azcopy v7.
Best regards,
Jonas
Hi @onny, thanks for reaching out! This feature is already implemented in V10 as well, we just haven't documented it officially yet.
The upload scenario works great, but the download scenario currently has a bug because we recently started printing "Scanning..." when the copy operation starts, this string unfortunately gets piped into the destination file when downloading. I'll fix this as soon as possible and also add documentation for this feature.
This bug seems to be raised for the STDIN ( the upload scenario)... So there is no bug here.. Right ?
@seguler yes you are right, I just wanted to use this issue for tracking purpose. I updated the tags accordingly. Thanks!
Sounds awesome, thanks :)
Hi @onny, this was fixed in v10.0.1.
Hi @zezha-msft how do you use STDIN/STDOUT with AzCopy? I'm looking for the same thing
Hi @ItalyPaleAle, thanks for reaching out!
Please refer to our help message by invoking azcopy cp --help:
Upload a single file through piping(block blob only) with SAS:
- cat "/path/to/file.txt" | azcopy cp "https://[account].blob.core.windows.net/[container]/[path/to/blob]?[SAS]"
Download a single file through piping(blobs only) with SAS:
- azcopy cp "https://[account].blob.core.windows.net/[container]/[path/to/blob]?[SAS]" > "/path/to/file.txt"
Most helpful comment
Hi @ItalyPaleAle, thanks for reaching out!
Please refer to our help message by invoking
azcopy cp --help: