0

I ran the following command that I found on internet.

s3cmd ls --recursive  s3://bucket/files  | awk '{print $4}' |  xargs -I@ s3cmd get @ -

a) Can anyone break this down from the xargs part
b) I specifically want to know what does "-" means in bash.

Sorry if the title is misleading.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Sarbjit
  • 33
  • 2
  • 10
  • It *doesn't* mean anything in or to bash itself. That said, it's likely that `s3cmd` takes it to mean "stdin or stdout, as appropriate", as this is the conventional meaning. See Guideline 13 at the end of http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html – Charles Duffy Apr 20 '18 at 18:28
  • ...so, in that case, we're telling `s3cmd` to run a `get` with the `@` replaced with result from the `s3cmd ls ... | awk` command line, and a `-` meaning that that result should be written to stdout. – Charles Duffy Apr 20 '18 at 18:30
  • Got you. Thank you so much for clearing this. – Sarbjit Apr 20 '18 at 18:45

0 Answers0