/execute
Executes another command but allows changing the executor, changing the position and angle it is executed at, adding preconditions, and storing its result.
There are fourteen‌[JE only] / eleven‌[BE only] subcommands (aka. instructions) for the /execute command. Multiple subcommands can be chained after /execute. Subcommands are divided into 4‌[JE only] / 3‌[BE only] categories: modifier subcommands, condition subcommands, store subcommands‌[JE only], and the run subcommand.
All needed subcommands can be concatenated together. Subcommands other than the run subcommand can be arranged arbitrarily and used multiple times. The run subcommand can be used only once, at the end of the chain. Only a run subcommand or a condition subcommand may finalize the chain; otherwise, the command is unparseable.
Complete article available
This cached Wiki page is unusually large, so it is loaded on demand to keep the initial page fast.