diff options
author | Andrew Cady <d@jerkface.net> | 2023-08-23 18:28:27 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-08-23 18:28:27 -0400 |
commit | 1515224417d8111f4f9974e1b527ae25bd144ea9 (patch) | |
tree | 116e83eb3afc4618878ce515063268b0c5fac92c | |
parent | 88a9b8f49123a0679267231d5738e34d93cf86c4 (diff) |
argument passing fixed
-rw-r--r-- | rpc.bash | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -38,7 +38,7 @@ all_commands() | |||
38 | gudge() | 38 | gudge() |
39 | { | 39 | { |
40 | echo "Hello, <$REPLY>." | 40 | echo "Hello, <$REPLY>." |
41 | echo "Don't argue with me about <$*>." | 41 | echo "Don't argue with me about <${*@Q}>." |
42 | } | 42 | } |
43 | 43 | ||
44 | fudge() | 44 | fudge() |
@@ -53,11 +53,12 @@ fudge() | |||
53 | read_remote_command() | 53 | read_remote_command() |
54 | { | 54 | { |
55 | len=$1 | 55 | len=$1 |
56 | shift | ||
56 | [ "$len" -gt 0 ] | 57 | [ "$len" -gt 0 ] |
57 | REPLY= | 58 | REPLY= |
58 | read -r -N"$len" | 59 | read -r -N"$len" |
59 | [ "$REPLY" ] | 60 | [ "$REPLY" ] |
60 | remote_command=(bash -c ${REPLY@Q} "$@") | 61 | remote_command=(bash -c ${REPLY@Q} bash "${@@Q}") |
61 | } | 62 | } |
62 | 63 | ||
63 | remote_run_shell_script_stdin() | 64 | remote_run_shell_script_stdin() |