From 93cdac2bb54547cf243d12081e038fd53c6ec049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ram=C3=ADrez-Chiquillo?= Date: Fri, 3 May 2024 06:22:51 -0500 Subject: [PATCH] website: fix js console --exec commands (#29666) --- docs/interacting-with-geth/javascript-console.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/interacting-with-geth/javascript-console.md b/docs/interacting-with-geth/javascript-console.md index ed72e0ae22..59f1536829 100644 --- a/docs/interacting-with-geth/javascript-console.md +++ b/docs/interacting-with-geth/javascript-console.md @@ -110,19 +110,19 @@ It is also possible to execute JavaScript code non-interactively by passing the For example, to display the accounts in the keystore: ```sh -geth attach --exec eth.accounts +geth --exec eth.accounts attach ``` ```sh -geth attach --exec eth.blockNumber +geth --exec eth.blockNumber attach ``` The same syntax can be used to execute a local script file with more complex statements on a remote node over http, for example: ```sh -geth attach http://geth.example.org:8545 --exec 'loadScript("/tmp/checkbalances.js")' +geth --exec 'loadScript("/tmp/checkbalances.js")' attach http://geth.example.org:8545 -geth attach http://geth.example.org:8545 --jspath "/tmp" --exec 'loadScript("checkbalances.js")' +geth --jspath "/tmp" --exec 'loadScript("checkbalances.js")' attach http://geth.example.org:8545 ``` The `--jspath` flag is used to set a library directory for the Javascript scripts. Any parameters passed to `loadScript()` that do not explicitly define an absolute path will be interpreted relative to the `jspath` directory.