Skip to content

oci os object put from STDIN not working in Cloud shell #490

@RichardExley

Description

@RichardExley

I am testing with oci cli 3.3.2. Here is a test script:

export BUCKET_NAME=bucketawk 'BEGIN { srand(); print int(1 + rand() * 1000000)}'`
oci os bucket create --compartment-id "$OCI_TENANCY" --name "$BUCKET_NAME"
TEXT="TextText"

oci os object put --bucket-name "$BUCKET_NAME" --name "Test1" --file - <<<"$TEXT"
echo -n "$TEXT" | oci os object put --bucket-name "$BUCKET_NAME" --name "Test2" --file -
echo "$TEXT" >TEXT_FILE
oci os object put --bucket-name "$BUCKET_NAME" --name "Test3" --file TEXT_FILE

for t in Test1 Test2 Test3; do
echo "$t:"
echo $(oci os object get -bn "$BUCKET_NAME" --name "$t" --file -)
done
`

Result (no errors) is:

`Test1:

Test2:

Test3:
TextText
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDKIssue pertains to the SDK itself and not specific to any service

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions