[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to declare -n from arguments ?
From: |
Zachary Santer |
Subject: |
Re: how to declare -n from arguments ? |
Date: |
Tue, 9 Jul 2024 10:12:24 -0400 |
On Mon, Jul 8, 2024 at 7:51 PM alex xmb sw ratchev <fxmbsw7@gmail.com> wrote:
>
> ill do on func call args=( '' "$@" ) and do args and i in -n
Nothing's stopping you from doing this, if you really want to:
declare -i i=0
while (( i < ${#} )); do
(( ++i ))
printf '%s\n' "${@:i:1}"
done
Could easily be modified to go through arguments backwards, for
instance. Something 'for arg in "${@}"' can't do.