help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] What is the different between `unset a[n-1]` in interact


From: Jesse Hathaway
Subject: Re: [Help-bash] What is the different between `unset a[n-1]` in interactive mode and non-interactive mode?
Date: Tue, 18 Dec 2018 09:15:37 -0600

Peng, what version of bash are you testing with?

At least in 4.4.23 the behavior is the same for me:

; bash --version
bash --version
GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http: gnu.org=""
licenses="" gpl.html="">

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
; set -v
set -v
; array=(a b c)
array=(a b c)
; n=3
n=3
; unset array[n-1]
unset array[n-1]
; declare -p array
declare -p array
declare -a array=([0]="a" [1]="b")



reply via email to

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