Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am creating a LINUX script that will make an SQLPLUS call to activate a procedure that builds the required URL. The URL is returned in a variable and then I wish to call the URL which will create a file (from a CURL call) on another server while returning either a 200 OK or a 404.
What is happening is I have an Oracle database I call with a procedure which takes in variables, builds a URL and returns the URL in a variable from the PL/SQL (call it builturl).
I wish, from within the Linux script to call this url, prefer wget if possible.
The URL I am calling is actually a web service which will make a call outside of company and create a data file from the call on another server and then will return to my call (url call if you will) either HTTP 404 or 200 OK.
All of this is then going to be automated using BMC Control - M software.
You can use Oracle Concurrent Manager to pass variables into scripts. Not sure the exact setup inside Oracle itself but in the script run by concurrent manager (here we name them all with .prog suffix - not sure if that is required or just our convention).
In the .prog you can read in the variables as positional parameters as you can with any other script. The first item passed is $1, the second is $2, the third $3, etc...
In your .prog you'd then want to set less ephemeral variables e.g. if you were passing 2 items into the script you'd do something near the beginning like:
url=$1
othervar=$2
You do that because the positional parameters might be overwritten by other tasks doing output within the script.
You can use your preserved variables later in the script:
wget $url
If you do a web search for "passing parameters concurrent program shell script" you'll find links that will tell you about the Oracle side of it like this one: http://oracleapplicationstechnicalsc...scripting.html
Last edited by MensaWater; 05-26-2017 at 10:26 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.