#!/bin/sh if [ "$1" == "" ] then echo "Syntax: $0 filename [version]" echo " diff between two versions of a file kept in pumpkin tftp server" echo " diff is between version and version-1. If version not specified, most current is used." exit fi # compare the current version of the $1 file with the immediately previous one. Does not work for file (1) and the original # uses pumpkins file versioning. For instance: # file (1) # file (2) # file (3) # @@ fix this to match the location of your tftp folder cd ~/PATH_TO_WHERE_THE_FILES_BE/ if [ "$2" == "" ] then let new=`ls -lrt $1* | awk '{ f=$NF }; END{ print f }'|tr -d " " |tr -d "(" | tr -d ")"` echo "Current version is $new"; else let new=$2 fi let old=$new-1; diff $1\ \($new\) $1\ \($old\)