Celeb Glow
updates | February 28, 2026

What is <

Consider:

#!/bin/bash
/u01/app/oracle/middleware/oracle_common/common/bin/wlst.sh <<!END
connect('user','pw');
p=redeploy('application');
p.printStatus();
exit();
!END

The above script is there to help me to perform a redeploy for weblogic application. The area I don't understand is wlst.sh <<!END as well as the last !END.

What's the function of both !END statements?

0

1 Answer

It's a Here Document -- the lines between <<!END and !END are fed to the stdin of wlst.sh

It could also be expressed as:

echo "connect('user','pw');
p=redeploy('application');
p.printStatus();
exit();" | /u01/app/oracle/middleware/oracle_common/common/bin/wlst.sh

but without the potential effects of running the command in a subshell.

It could also also be expressed as:

echo "connect('user','pw');
p=redeploy('application');
p.printStatus();
exit();" > someFile
/u01/app/oracle/middleware/oracle_common/common/bin/wlst.sh < someFile
rm someFile
7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy