[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: history position out of range
From: |
DennisW |
Subject: |
Re: history position out of range |
Date: |
Wed, 13 Jan 2010 15:29:55 -0800 (PST) |
User-agent: |
G2/1.0 |
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.