bug-bash
[Top][All Lists]
Advanced

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

Re: [sorry for dups] Re: why difference between interactive+script doing


From: Greg Wooledge
Subject: Re: [sorry for dups] Re: why difference between interactive+script doing same thing?
Date: Mon, 27 Mar 2023 19:52:55 -0400

On Mon, Mar 27, 2023 at 04:43:09PM -0700, L A Walsh wrote:
> On 2023/03/27 13:28, Greg Wooledge wrote:
> > You're calling filter_ssh with no arguments, but trying to use "$@"
> > inside it to generate the ssh command.
> Isn't "$@" still valid?  Originally I didn't have func-filterssh, it was
> inline.

Each function has its own private set of positional parameters ("$@" array)
independent of the main script's "$@".  If you want the funtion to see
a copy of the script's arguments, you need to pass "$@" to it.



reply via email to

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