bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add support for array .pop()


From: lolilolicon
Subject: Re: Add support for array .pop()
Date: Sat, 15 Oct 2016 17:47:22 +0800

On Sat, Oct 15, 2016 at 5:41 PM, lolilolicon <address@hidden> wrote:
>
> pop() {
>     local -n _a=$1
>     printf -v "$2" "${_a[-1]}"

and of course I meant

printf -v "$2" '%s' "${_a[-1]}"


The keyword is nameref if you haven't heard of it, so you can look it
up in the man page :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]