how to write bat command to execute multi executable command file
ex: (this not work)
echo off
gexp attach
admin.peers
exp.getBalance(exp.coinbase)
when run this bat file we can see 3 info appear on console with one click
Not possible.
- the first command (called from command prompt or terminal) attaches to a running gexp console
there you can enter any gexp commands, but your bat is currently in the first gexp call
- after returning from gexp console (type exit) you are back in the (win/linux) terminal.
- if now "admin.peers" is called, it is an unknown command for the win/linux command line, the same for your last command.
You cannot execute gexp commands from the terminal directly (except "gexp account new")
The only way (I know) to execute commands in the gexp console by batch is using the RPC API (see
https://github.com/ethereum/wiki/wiki/JSON-RPC)