Not a good example of shell programming, just an example of what to change from that shown in post #1 for your own button add-in to the Helper menu.
The Button Man's helper menu is in */extensions/helper
Mine are going into */extensions/helper2
Pick a directory name of your own to use.
In config.xml change **ONLY** the >author< attribute.
In the menu.json file change the 'name:' string to the button label.
In the same line, change the 'action:' string to your path and filename. Paths are relative to your extension directory name.
The 'sort priority' field is not currently used, leave it set at 1.
This demo only adds one button, but add additional button defs. as shown in the post #1 example code as required.
Write a shell script (which can be executed by Busybox Ash) for that described in the 'action:' string (put in your own bin directory).
All of the above text files **should** use Linux line endings.
Create a compressed tarball based at your helper's directory name, see attached for an example.
Enjoy.
(PS: example creates a report 'book' in documents with only the character '/' in it.) I.E: The current working directory of your scripts - which are run as the administrator 'root'.