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: L A Walsh
Subject: Re: [sorry for dups] Re: why difference between interactive+script doing same thing?
Date: Tue, 28 Mar 2023 16:10:08 -0700
User-agent: Thunderbird

On 2023/03/27 16:52, Greg Wooledge wrote:

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.
---
Yeah, forgot that.  Fact was in area of self-memory insufficiently redundant
to survive ischemic event 16 months ago.

Changed to:

fnname "$@"

fnname () {
 my -a cmd=("$@")
 ... ssh ... "${cmd[@]}"
}




reply via email to

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