Next: , Up: Checking Recfiles

8.1 Syntactical Errors

One easy mistake is to forget the colon separating the field name from its value.

     %rec: Article
     %key  Id
     Name: Thing
     Id:   0

Running recfix on this file will immediately tell us that there is a problem:

     $ recfix --check inventory.rec
     inventory.rec: 2: error: expected a record

Here, recfix has diagnosed a problem in the file inventory.rec and the problem lies at line 2. If, as in this case, recfix shows there is a problem with the recfile, you should attend to that problem before trying to use any other recutils program on that file, otherwise strange things could happen. The --check flag is optional but in normal execution not required because that is the default operation.