Inserting Keywords

Another feature desired by users of RCS besides basic version control is file keywords. To utilize RCS keywords (see section on keywords) simply insert the keywords into the file. For example, placing the well-known Id keyword at the end of the file is accomplished by this shell command:

$ echo '$Id$' >> our_file.txt

When the file is checked-in and out, RCS will replace the keywords with their respective values:

$ ci -l our_file.txt
RCS/our_file.txt,v  <--  our_file.txt
new revision: 1.3; previous revision: 1.2
enter log message, terminated with single '.' or end of file:
>> Added Id keyword.
>> ^D
done

Here are the contents of the file:

$ cat our_file.txt
This is our file.
Which of it is ours?
Do we agree to it?
$Id: our_file.txt,v 1.3 2003-05-27 03:11:54-04 ashawley Exp $