Re: mth part of n parts
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <CAEE75_1WTap3oXkW1S8K1+X0iYNz1mmT5KYTdycRd5tyFDwz5w@mail.gmail.com> |
> sed -n "$((${i}*${bs})),$((${i}*${bs}+${bs}-1))p"
I think you don't need the explicit substitution
sed -n $((i*bs-bs+1)),$((i*bs))p
(I think op wants 1-based indexing rather than 0-based offsets)
or is that a bashism?