In this recipe, you will learn how to invoke CLI commands directly from your command line without accessing the CLI itself, let's say not in an interactive way. This technique might be helpful in case you have to script some processes, like stopping and starting servers in a sequence, deploying an application only if another one has already been deployed, and so on. Often times, you also need to monitor some state, thus you just need that number (as typically seen in Nagios).
Remember I'm running WildFly remotely, bound to
192.168.59.103 as IP. WildFly is already up and running.
On your local PC, open a new terminal window and run the following commands:
$ cd $WILDFLY_HOME $ ./bin/jboss-cli.sh -c --controller=192.168.59.103:9990 ...