Skip to content

Unable to process files with a hash sign in commands file #309

@giubil

Description

@giubil

When using the run command, it's not possible to process files which have a # in their names (which is a valid character in S3), as they are interpreted as inline comments.

It's not possible to escape them either, as the \ is passed on to S3.

Example with file s3://dummy/foo/test \#3 /bar.jpg (filenames were removed) :

$ s5cmd --dry-run run test                                                          
mv s3://dummy/foo/test \#3 /bar.jpg s3://dummy/foo/test \#3/bar.jpg
$ s5cmd --log debug run test
ERROR "mv s3://dummy/foo/test \\#3 /bar.jpg s3://dummy/foo/test \\#3/bar.jpg": NoSuchKey: The specified key does not exist. status code: 404, request id: DJQNRYQN42QTWC7E, host id: YF1dXLn/wFe7VXNidbR8KCgZVRWqYdtpLmnvDDM9WfIGVSq3egUslUjQ8lgOlRnAON1B0Rkgr3Y=

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions