Although the refdb command-line programs seem intimidating to many people used to graphical user interfaces, they're not as arcane as you may fear. Help is available with a few keystrokes. Now that refdbc waits for your commands, how can you find out what commands are available? What do you shout when you fear to drown? You'll be yelling "help" (if your audience speaks English, that is), and this is what works well with refdbc too. The uncommunicative among us can use a question mark "?" instead, although I wouldn't recommend this when you're about to drown. With refdbc you'll see something like:
refdbc: help This is a command overview. To get specific information about a command, run this command with the -h option. help Display this text. ? Synonym for `help'. quit Quit refdbc. addref Add references to the database. deleteref Delete references from the database. getas Get a list of series editors. getau Get a list of authors. geted Get a list of editors. getkw Get a list of keywords. getjf Get a list of journal names (full). getjo Get a list of journal names (abbrev). getj1 Get a list of journal names (custom abbrev1). getj2 Get a list of journal names (custom abbrev2). getref Get a list of references. listdb List databases. liststyle List bibliography styles. pickref Add references to your personal interest list. selectdb Select a database. set Set new value of config variable. updateref Update references in the database. verbose Toggle verbose mode. whichdb Show current database. refdbc: |
The left column shows the names of the available commands, while the right column shows a brief command description.
Most of the commands need some arguments in order to make sense. As the help output above said, running any of the available commands with the -h option will display a short message about the purpose and the syntax of the command. The command will not run, so it is safe to play around with this option. Just to get a feel for this help system, look up how you would list available databases. You set a default database in your configuration file, but maybe there are more databases available (not all of them are necessarily refdb databases; your administrator can tell you). As you can see above, you'd use the listdb command. To see how it works, just type
refdbc: listdb -h Lists the names of the available databases. If an argument is given as a SQL regular expression, only the matching databases are shown. Syntax: listdb [-h] [SQL-regexp] Options: -h prints this mini-help All other arguments are interpreted as an SQL regular expression. refdbc: |
This is a fairly simple command that takes just one argument: A SQL regular expression to specify a group of databases. If you never had the pleasure to get in touch with regular expressions: they are somewhat like the "wildcards" you may know from command shells, but more powerful. But this is not the point here. The square brackets around the argument tell you that the argument is optional, that is you can run the command without the argument if you wish. If you leave out the argument, you do not restrict the search to a certain pattern, so the command will return all database names.
This is how quite a lot of the refdbc commands work. Of course there are more complicated ones, and you'll be introduced to some of these below.