help-bash
[Top][All Lists]
Advanced

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

Re: Use of $@


From: Kerin Millar
Subject: Re: Use of $@
Date: Tue, 21 Feb 2023 11:51:23 +0000

On Tue, 21 Feb 2023 12:38:16 +0100
alex xmb ratchev <fxmbsw7@gmail.com> wrote:

> On Tue, Feb 21, 2023, 12:37 PM alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> 
> >
> >
> > On Tue, Feb 21, 2023, 11:28 AM Christof Warlich <cwarlich@gmx.de> wrote:
> >
> >> Hi,
> >>
> >> just to improve my bash skills: The following functions prints the array
> >> index of a value if found:
> >>
> >> index() { local e="$1"; shift; local a=("$@"); for i in "${!a[@]}"; do
> >> [[ ${a[$i]} != $e ]] || { echo $i; break; }; done; }
> >>
> >
> > here is a substitude version , speed is in question , but i wouldnt learn
> > anything without writing such ..
> >
> 
> sorry this termux gmail doesnt paste well ..
> 
> u.1 http://0x0.st/HsSf.txt

Perhaps add a plain text attachment if you insist on using a defective email 
client (as long as it's small). These 0x0.st links will eventually expire, 
which doesn't help future readers of the list archive.

-- 
Kerin Millar



reply via email to

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