#!/bin/bash # # rcsedit # # just a simple script to edit a file and rcs it # [ "$EDITOR" ] || EDITOR=vim FILES= # find files that exist and save them in an list for file in $@ ; do if [ ! -e $file ]; then echo "Couldn't find file '$file'" else FILES="$FILES $file" fi done # check out all the good files and edit them if [ "$FILES" ]; then co -l $FILES $EDITOR $FILES ci -u $FILES else echo "No files to edit" fi