Unexpected use of the WLST interpreter

I am trying to figure out how to make the weblogic WLST terminal run in silent mode. When I start the terminal using the command java weblogic.WLST, 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 so that the interpreter does not write these lines? I tried it with pleasure - for silence, to no avail. And all my googling leads me to the -i flags, which does something completely different.

EDIT:

To clarify my purpose:

I need an interpreter to run the python script, and I need the output from this. The welcome message is useless, however, that I would like to get rid.

Limited:

, , , . - python script . - , . , python.

+3
4

:

" ", .

runwlst.sh:

#!/bin/bash
. ${WLS_HOME}/server/bin/setWLSEnv.sh >/dev/null 2>&1
FILENAME=$1
shift
java weblogic.WLST ${FILENAME} "$@" | sed -e "1,7 d"

WLS_HOME setWLSEnv.sh.

WLST "shell", ( ".wlsh" ):

#!/bin/bash /absolute_path_to_runwlst.sh/runwlst.sh
# your WLST Python code starts here
import ...

, sed script, runwlst.sh, , "" 7 , WLS.

, WLST :

$ createManagedServer.wlsh domain servername 

WLST - , :

#!/bin/bash
PORT=`./getPortForManagedServer.wlsh domain server`
echo ${PORT}

+2

, - ... grep -v .. :

java weblogic.WLST script.py $ARGS | grep -v " WebLogic Scripting Tool (WLST)..." | grep -v " WebLogic Server Scripting Shell" | grep -v " help() " | grep -v " \" AdminServer \ ", \" domain \ "." | Grep -v ": ". | grep -v " , SSL ." | grep -v " domainRuntime . " | grep -v " DomainMBean root MBean." | grep -v " help ('domainRuntime')" | grep -v " " | grep -v " to t3://"

+1

, JVM, stdout stderr , , - mbeans, . - , JSON stdout - , .

python script, OutputStreams, , WSLT . "" , .

0

I wanted it to show only the lines that I printed inside the script, so I did it simply - add a special char sequence to all the lines that I wanted to see in the logs (this was print('--> ...')in my case) and ran it like this:

wlst.sh changePassword.wlst.py "$@" | grep -- "-->"

Output Example:

Executing WLST script for domain SampleDomain
--> Executing credential change for SampleDomain
--> Changing DB password for DSTYPE1
--> Changing password for DataSource SampleDS1
--> Successfully changed DB credentials!
--> Changing password for DataSource SampleDS2
--> No JDBC resource with name SampleDS2 found, skipping...
--> Changing password for DataSource SampleDS3
--> No JDBC resource with name SampleDS3 found, skipping...
--> Changing password for DataSource SampleDS4
--> Successfully changed DB credentials!
Completed execution for domain SampleDomain
0
source

All Articles