adoroszlai commented on PR #7727:
URL: https://github.com/apache/ozone/pull/7727#issuecomment-2607618551
> 1. If one command in a batch fails, what happens? Do the others keep
executing or does it stop the batch?
Yes, it keeps executing. The behavior is inherited from interactive shell
behavior, where this is desired. I guess batch mode should stop on first error.
> 2. What if commands have output? Does each command output just goto stdout
/ stderr? Is there any delimiter to indicate the start / end of an output, or
what command the output is associated with?
Commands are echoed, so it's easy to see which command resulted in which
output.
```
$ ozone sh \
--execute 'volume create /x' \
--execute 'volume create /vol3' \
--execute 'bucket create /vol3/bucket1' \
--execute 'key put /vol3/bucket1/key /etc/hostname' \
--execute 'key cat /vol3/bucket1/key'
volume create /x
INVALID_VOLUME_NAME volume length is illegal, valid length is 3-63 characters
volume create /vol3
VOLUME_ALREADY_EXISTS Volume already exists
bucket create /vol3/bucket1
BUCKET_ALREADY_EXISTS Bucket already exist
key put /vol3/bucket1/key /etc/hostname
key cat /vol3/bucket1/key
9e574fae0cca
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]