PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /usr/share/rear/lib/
Server: Linux server62.dnsserverboot.com 6.8.1-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar 15 15:39:22 EDT 2024 x86_64
IP: 94.23.164.13
Choose File :

Url:
Dir : //usr/share/rear/lib/array-functions.sh

# some array functions

# return whether $1 equals one of the remaining arguments
function IsInArray() {
    local needle="$1"
    test -z "$needle" && return 1
    while shift ; do
        # at the end $1 becomes an unbound variable (after all arguments were shifted)
        # so that an empty default value is used to avoid 'set -eu' error exit
        # and that empty default value cannot match because needle is non-empty:
        test "$needle" == "${1:-}" && return 0
    done
    return 1
}

function RmInArray() {
    # "$1" string to be removed in array "${2[@]}"
    # please note that the array elements are a bunch of words in this function
    # usage: BACKUP_RSYNC_OPTIONS=( $( RmInArray "--relative" "${BACKUP_RSYNC_OPTIONS[@]}" ) )
    local needle="$1"
    declare -a nArray  # we will build a new array
    while shift ; do
        if [[ "$needle" != "$1" ]] ; then
            nArray=( ${nArray[@]} "$1" )
        fi
    done
    # we return the array as a string
    echo "${nArray[@]}"
}