edit:
Changed the braced iterators, good call. Also, call this function with a reverse iterator.
You can probably do something like this:
#!/bin/bashHISTFILE=~/.bash_history # if you are running it in a # non interactive shell history would not work elseset -o historyfor i in `seq $1 $2`;do history -d $idonehistory -w
Where you will evoke like this:
./nameOfYourScript 563 514
Notice I haven't put any error checking in for the bounds. I'll leave that as an exercise to the reader.
see also this question