3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
First, the $a syntax you're using in your sed command is used to append text after a specific line number, rather than at the end of the file. To append text at the end of the file, you should use the $ symbol alone.
Second, it's possible that the sed command is not working because of a permission issue or a problem with the file location or content.
maybe you can use
aws ecs execute-command --cluster <cluster-name> --task <task-id> --container <container-name> --interactive --command "echo 'ADD No.1' >> /tmp/<filename>"
0
I tried the following command, but cannot append into file.
aws ecs excute-command --cluster xxxx --task xxxxxxxxxxxxxx --container app --interactive --command "echo 'No.1 add' >> /tmp/xxx"
répondu il y a un an
0
I append character into file by using ecs exec.
aws ecs excute-command --cluster xxxx --task xxxxxxxxxxxxxx --container app --interactive --command "/bin/sh -c 'echo dummy char >> /tmp/xxx'"
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 5 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an