peak / s5cmd

Parallel S3 and local filesystem execution tool.
MIT License
2.71k stars 240 forks source link

Document escaping in s5cmd run #773

Open ewjoachim opened 6 days ago

ewjoachim commented 6 days ago

Hello,

How does own would write a file for s5cmd run when one needs to manipulate files containing spaces, single quotes etc ?

It looks like e.g. cp 'x y' 'zt' works (with single quotes) if the files contain spaces, but what if the file names also contains single quotes ?

1/ It's very nice if you have an answer 2/ It's even better if we can document this answer :)

Thank you !

ewjoachim commented 6 days ago

Hm, it seems that all the answers needed are here: https://github.com/peak/s5cmd/issues/713#issuecomment-2027644647 In particular:

the line is split via kballard/go-shellquote.Split "...according to /bin/sh's word-splitting rules"

So mainly, what's left is to make those parts documented.