Creating RAR archives

A couple of workarounds are here, which let you do this now:

  1. Simple command which may be all you need:
    ARCHIVE=.7z and ARCHIVE=single at the same time
    (Jon's post; the first reply.)

  2. A script version which is more complex but may be useful if you want to add additional logic, or find the simple command doesn't work in some situations:
    ZIP compression level ignored
    (My post; the second reply.)

If using the script, change all (4) occurrences of .ZIP to .7Z or to .RAR as appropriate.