Export/save codeblock into file

First, sry for bad English.
If there is one similar, pls let me know. I did check the Linux terminal plugin, but is not something that i had in mind…

When we make code-block like is

sudo apt-get update

or any of code-block that inside ticks we can have the copy button on reading tab and we can paste it on any other place.

Mine idea is that we can have save or export button that will save that code-block in location we wish, or in same folder, as any of extension is need/selected. Something like Save As... button for code-block.
And/Or to have execute button that will read that block and execute, in my idea is linux bash/sh, that block as is separated file outside obsidian.