On 1/14/21 4:44 AM, William Park wrote:
Here is another feature request.
In C struct, eg.
struct {
char date[7], dev[16], ver[32], rev[10], ...
}
you just access variables, and compiler will do the offsetting. I would
like something like that, where I don't have to do the book
On Thu, Jan 14, 2021 at 07:16:12PM +0700, pepa65 wrote:
> On 14/01/2021 16.44, William Park wrote:
> > Then, I just use variable "rev" and that would be equivalent to
> > ${@:55:10}.
>
> So you could just do: rev=(${template[@]:55:10})
Needs more quotes.
On 14/01/2021 16.44, William Park wrote:
> Then, I just use variable "rev" and that would be equivalent to
> ${@:55:10}.
So you could just do: rev=(${template[@]:55:10})
With a little function like this, you could call:
Struct template date 7 dev 16 ver 32 rev 10
and get what you want with an exi