Next: , Previous: Overview, Up: Top

3 Running abcsh as a command line utility

Here's an example of running abcsh to merge two ABC music notation files, create a table of contents and save the results as First is the command sample and followed by the output.

abcsh --table-of-contents

     Making a table of contents

In this example two files are read into the abcsh buffer - and abcsh renders the content of the abcsh buffer based on the order of the arguments on the command line. That is why is read before It is also why appears before in the table of contents. These two files are then written out of the abcsh buffer to a file called

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]...
       --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.
                                  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