Running the WLST interpreter silently

Martin Nielsen picture Martin Nielsen · Feb 17, 2014 · Viewed 7.6k times · Source

I am trying to figure out a way to make the weblogic WLST terminal run in silent mode. When i start the terminal with the java weblogic.WLST command, it prints the lines:

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Is there a command line flag or some unknown witchcraft to make the interpreter not write these lines? I wishfully tried -s for silent, to no avail. And all my googling lead me to an -i flag that does something completely different.

EDIT:

To clarify my purpose:

I need the interpreter to run a python script, and i do need the output from that. The welcome message is useless clutter however, that i would like to be rid of.

Limited to:

The only problem i have is the first lines written by the interpreter itself. Once inside the python script i have no problem handling what send to the output. My only problem is the welcome lines written above. These are written by the interpreter itself, and not the python code.

Answer

Patrick Muller picture Patrick Muller · Oct 23, 2016

To solve the problem, I did something little differente.. I put a grep -v in the output .. like this:

java weblogic.WLST script.py $ARGS | grep -v "Initializing WebLogic Scripting Tool (WLST) ..." | grep -v "Welcome to WebLogic Server Administration Scripting Shell" | grep -v "Type help() for help on available commands" | grep -v "Successfully connected to Admin Server \"AdminServer\" that belongs to domain \"domain\"." | grep -v "Warning: An insecure protocol was used to connect to the server." | grep -v "To ensure on-the-wire security, the SSL port or Admin port should be used instead." | grep -v "Location changed to domainRuntime tree. This is a read-only tree" | grep -v "with DomainMBean as the root MBean." | grep -v "For more help, use help('domainRuntime')" | grep -v "Successfully connected to Admin Server" | grep -v "Connecting to t3://"