But in bash scripting, you'd just use rsync or cp or rm -- maybe an
example would make clearer how REXX differs from bash.
I suspect the only really good examples would have to written under
OS/VMS (where it originated, written to be a more powerful & friendlier
replacement for the EXEC scripting language) or AmigaOS -- to
demonstrate the switching interaction of command handlers. REXX
implementations for Windows and Linux pretty much only support the
"shell" as a command handler, whereas the two named OS could address
editors (and on the Amiga, word processors, desktop publishing programs,
terminal emulators/comm programs, system editor).
My Amiga's been in storage since Win95 days, so this is a fictitious
example based on the reference manuals.
address command /* use normal command shell to process commands */
file = 'some.file'
'run ed' file /* start ED editor in background, editing 'file'*/
address ED /* send commands to the ED instance */
'b' /* go to bottom of file */
'i /text to be inserted before bottom line/'
't' /* to to top */
'a /text inserted after first line/'
find = 'needle'
replace = 'thorn'
'rpe /' || find || '/' || replace '/'
'x' /* save & exit */
address command
'type' file /* type file to screen */
'filenote' file "edited via AREXX script"