Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Beast mode" example is incorrect #714

Open
PerMildner opened this issue Mar 18, 2024 · 0 comments
Open

"Beast mode" example is incorrect #714

PerMildner opened this issue Mar 18, 2024 · 0 comments

Comments

@PerMildner
Copy link

s5cmd/README.md

Line 734 in c1c7ee3

BUCKET=s5cmd-test; s5cmd ls s3://$BUCKET/*test | grep -v DIR | awk ‘{print $NF}’

The title should presumably be "Batch mode s5cmd" not "Beast mode s5cmd".

The example is not correct:

BUCKET=s5cmd-test; s5cmd ls s3://$BUCKET/*test | grep -v DIR | awk ‘{print $NF}’
| xargs -I {} echo “cp s3://$BUCKET/{} /local/directory/” | s5cmd run

This will not work if any file name listed by s5cmd ls contains white space (or other "funny" chars) in its name, because:

  1. awk ‘{print $NF}’ will then only extract some suffix of the file name (since a white space in the file name would be used by awk as a field delimiter).
  2. Even if the file name extraction from the result of s5cmd ls was corrected, the resulting input to s5cmd run would most likely not work (also see issue run input syntax is not documented #713).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant