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
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
>
On 2023/03/27 13:05, L A Walsh wrote:
That "$@" is not going to work the way you want it to in the general
case.
---
While I got rid of $@ in some test versions, it was back in
in later version, so that may be the main flaw at this point.
Will need time to clean this mess up...
On 2023/03/27 13:28, Greg Wooledge wrote:
On Mon, Mar 27, 2023 at 01:05:33PM -0700, L A Walsh wrote:
filter_ssh() {
ign0='ssh: connect to host \w+ port 22: Connection refused'
ign1='(agent returned different signature type ssh-rsa)'
ign2='(ssh_exchange_identification: read:
On Mon, Mar 27, 2023 at 01:05:33PM -0700, L A Walsh wrote:
> filter_ssh() {
>ign0='ssh: connect to host \w+ port 22: Connection refused'
>ign1='(agent returned different signature type ssh-rsa)'
>ign2='(ssh_exchange_identification: read: Connection reset by peer)'
>
On 2023/03/27 12:39, Greg Wooledge wrote:
You aren't showing the actual commands that the script is running, so
we have no way to verify that whatever the script is doing is identical
to what you were doing interactively.
Also:
readarray output< <(ssh -n -T "$user@$host" "$@" 2>&1)
On Mon, Mar 27, 2023 at 12:24:35PM -0700, L A Walsh wrote:
> interactive:
>
> readarray out< <(ssh -n -T "$user@$host" 'printf "1\n2\n3\n4\n5\n"' 2>&1);
> printf "%s" "${out[@]}"
> In script:
>
> on_host athenae 'printf "1\n2\n3\n4\n5\n"' Using host athenae
> 103: host athenae, up
> Read 1
Don't know that this is a bug -- there is likely some reason why there's
a difference in interactive vs. script execution. Certainly is annoying!
I'm trying to develop a script to help me run commands on a remote
system. Seems obvious -- it is ssh based, but for me ssh generates
1 warning
Don't know that this is a bug -- there maybe some reason why there's
a difference in interactive vs. script execution...certainly isn't helpful
in trying to develop a script though.
I'm trying to develop a script to help me run commands on a remote
system. Seems obvious -- it is ssh based, but
Don't know that this is a bug -- there is likely some reason why there's
a difference in interactive vs. script execution. Certainly is annoying!
I'm trying to develop a script to help me run commands on a remote
system. Seems obvious -- it is ssh based, but for me ssh generates
1 warning
Don't know that this is a bug -- there is likely some reason why there's
a difference in interactive vs. script execution. Certainly is annoying!
I'm trying to develop a script to help me run commands on a remote
system. Seems obvious -- it is ssh based, but for me ssh generates
1 warning
Don't know that this is a bug -- there maybe some reason why there's
a difference in interactive vs. script execution...certainly isn't helpful
in trying to develop a script though.
I'm trying to develop a script to help me run commands on a remote
system. Seems obvious -- it is ssh based, but
12 matches
Mail list logo