On Jan 13, 2:29 pm, Sérgio Monteiro Basto <sergi...@sapo.pt> wrote: > Hi, > How I delete history from entry 2 to entry 22 > > $ history -d 2:22 > bash: history: 2:22: history position out of range > > man history say: > > history -d offset > > where is define, the sintax of the offset? > > Thanks in advance, > -- > Sérgio M. B.
I believe it only takes a single value rather than a range. You can do this: $ for i in {22..2}; do history -d $i; done Note the reversal of the range.