Here's an example of running abcsh to merge two ABC music notation files, create a table of contents and save the results as mytunes.abc. First is the command sample and followed by the output.
abcsh --abc-input=tune1.abc --abc-input=tune2.abc --table-of-contents --abc-output=mytunes.abc:
Reading tune1.abc Reading tune2.abc Making a table of contents Writing mytunes.abc
In this example two files are read into the abcsh buffer - tune1.abc and tune2.abc. abcsh renders the content of the abcsh buffer based on the order of the arguments on the command line. That is why tune1.abc is read before tune2.abc. It is also why tune1.abc appears before tune2.abc in the table of contents. These two files are then written out of the abcsh buffer to a file called mytunes.abc.
If you want to see all the options that abcsh supports try the command abcsh --help:
abcsh - A Shell for Processing ABC music notation content Usage: abcsh [OPTION]... [FILE]... Options: --dry-run take no real actions --no-warn disable warnings --directory NAME use specified directory --cd NAME change to specified directory before proceeding -a, --abc-input=FILE Read an ABC File into abcsh's buffer -A, --abc-output=FILE Write out the abcsh buffer as an ABC file. -c, --count List the number of tunes, voices and measures in the current abcsh buffer -i, --interactive prompt for confirmation -I, --index Generate an index of the current abcsh buffer. -q, --quiet, --silent inhibit usual output -r, --renumber=START_NO Renumber the X ref fields in the abcsh buffer starting with START_NO if supplied, otherwise start with 1 -s, --select=T/V/M Select contents of abcsh buffer by T (a range of tune numbers), V (a range of voice numbers), and M (a range of measure numbers). A range is a series of number separated by commas or dash or an astrick to include the entire set. E.g. --select=1,3-5/*/1-4 would select tunes 1, 3, 4, and 5. The asterix indicates all voices. Finally select meaures 1 through 4 from that set. -S, --script=FILE Run a script on the abcsh buffer's content -t, --table-of-contents Generate a table of contents from the current contents of the abcsh buffer -v, --verbose print more information -V, --version output version information and exit -x, --musicxml-input=FILE Read in a MusicXML file into abcsh buffer -X, --musicxml-output=FILE Write out the abcsh buffer as a MusicXML file. -h, --help display this help and exit