Commands follows
511 clear
512 history
513 history -d 505
514 history
515 history -d 507 510 513
516 history
517 history -d 509
518 hist
Changed the braced iterators, good call. Also, call this function with a reverse iterator.
You can probably do something like this:
#!/bin/bash
HISTFILE=~/.bash_history # if you are running it in a
# non interactive shell history would not work else
set -o history
for i in `seq $1 $2`;
do
history -d $i
done
history -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