Need advice on shell scripting

If my message is better suited for a more specific group, please suggest it.
I have a job opportunity: managing a lab of mixed Windows and Macintosh desktops. Two job requirements are:
* Experience administering and deploying server hardware and software
* Proficiency with scripting languages, e.g. perl, python, shell
My question: what sort of shell scripting is typical for this sort of work?
I'll be grateful for any help.
Cheers,
noob81

At the entry level, administering operating systems via scripting involves managing filesystems, applications and users.
I would suggest to pick a book on "Administration" and on "Scripting" and this should provide an idea on what is being administered and what could be scripted.
For Windows, look for guides on "command-line administration" and "vbscript/powershell scripting".
For Mac, the below link should get you started.
http://images.apple.com/server/macosx/docs/IntroCommand_Line_Adminv10.6.pdf

Similar Messages

  • Need help in Shell Scripts

    Hi,
    I have a requirement need a help.
    Requirement states like this:
    I need to write a shell script through which I need to search a huge lines code and to find out following information :
    1. Total No of lines of the code
    2. No of DML statements (select,update,insert, delete) used like how many SELECT, How many UPDATE etc used in it.
    3. No of base apps tables referenced like How many tables starting with "CMF_" is present.
    4. No of procedure calls like how many procedures starting with "PROC_" used.
    Can anyone help me in this ? I need to script.
    My Unix version is :
    $ uname -a
    SunOS appsnet 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-4
    Thanks in advance
    [email protected]

    What you need here is a AWK script. This script will read the input as the source file (as command line
    argument or as standard input), and process each like of the file read to look for the different patterns
    in that line (looking for example if the line contans "SELECT " or "INSERT " etc...) and increment its
    corresponding count. At the end of the script in the END section you can get the number of lines with the
    NR awk inbuilt variable.
    Hope this helps.
    Hi,
    I have a requirement need a help.
    Requirement states like this:
    I need to write a shell script through which I need to search a huge lines code and to find out following information :
    1. Total No of lines of the code
    2. No of DML statements (select,update,insert, delete) used like how many SELECT, How many UPDATE etc used in it.
    3. No of base apps tables referenced like How many tables starting with "CMF_" is present.
    4. No of procedure calls like how many procedures starting with "PROC_" used.
    Can anyone help me in this ? I need to script.
    My Unix version is :
    $ uname -a
    SunOS appsnet 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-4
    Thanks in advance
    [email protected]

  • Need help with shell scripting and Patching

    Hello all,
    I am a very new Oracle DBA and I just have an interview where i have been ask two questions that i have no idea of what it is
    1/ What is shell scripting and how do you do shell scripting?
    2/ What is Patching and how do you do patching?
    Can some one help to have a very good understanding of these tow questions?
    Thanks a lot

    1/ What is shell scripting and how do you do shell scripting?shell accept command from you (via keyboard) and execute them. But if you use command one by one (sequence of 'n' number of commands) , the you can store this sequence of command to text file and tell the shell to execute this text file instead of entering the commands. This is know as shell script.
    Shell script defined as:
    "Shell Script is series of command written in plain text file. Shell script is just like batch file in MS-DOS
    for example:- for taking backup, health check and doing some task Operating system level or Oracle database level we can create shell script and schedule a cron job
    2/ What is Patching and how do you do patching?for example ,in windows while using sometimes you might face an issue/error and it gives pop up error message would like to send/report this error to microsoft? microsoft will send you a fix for that. lot of fixes for errors/bugs are released as patches.( n number of patches with newer features are releases as new version)
    likewise in oracle for resolving bugs we should have to apply patch.
    patch is basically a fix for a bug/bugs. we need to use opatch utility to apply the paches.
    hope, this helps you

  • Need to call Shell script that uses SQL loader in APex4.1/11g

    Hi there!
    I have a requirement, wherein I have to call a shell script that connects to an external server, ftp's a file in and then uses sqlloader to load data into our table. Now we have the ftp script that does this for another program, but is a scheduled job. I wanted to call the ftp shell script from within APEX. Any suggestions on how this can be done, what PL/SQL logic can we use? I see online some people using dbms scheduler for this?
    Thank you
    Sun

    Hi,
    Create some sh script on your oracle host machine where you can join into external server and run the process.
    something like:
    run_external_sh.sh
    #!/bin/sh
    ssh ext_user@ext_host ./sqlloader/import/import.shThen create a external JOB to call it via ORACLE(PL/SQL)
    -- Call Shell Script.
    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'external_call_sh',
        program_type        => 'EXECUTABLE',
        program_action      => '/local_host/call_external/sh/run_external_sh.sh',
        number_of_arguments => 0,
        enabled             => TRUE,
        comments            => 'Call external SH script');
    END;
    /Now you can create a scheduled/or not scheduled JOB
    -- Job defined by an existing program and schedule.
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'jb_external_call_sh',
        program_name  => 'external_call_sh',
        schedule_name => 'external_call_scheduler', -- created scheduler
        enabled       => TRUE,
        comments      => 'Job defined by an existing external_call_sh program and schedule.');
    END;
    /Now you can call the JOB in APEX in PL/SQL process.
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'jb_external_call_sh');
    END;Regards
    J :D

  • URGENT- Need advice on executing scripts from Forms 6i

    Hi all,
    Quick background info:
    I'm working on a conversion project from Forms 4.5 client/server applications to a three tier, web based Forms 6i environment.
    We're running Oracle 8i DB on HP-UX machines, Oracle 9ias on HP-UX machines, and users access forms through Netscape
    on Win2000 platform.
    The problem:
    I have a SQL execution interface form from which users have been able to run dynamic SQL scripts w/o having direct access to
    a SQL Plus prompt (uses the 'HOST' command in 4.5). How can this functionality be implemented in the three tier environment?
    Unless other options are available, my plan is to use a Java servlet to access the 8i database on the UNIX box and display
    output on an html page. Is there a better/easier way?!
    Any advice is appreciated...
    FLM
    Paychex, Inc.

    Thanks for the response,
    I may be able to invoke the script from Forms using the HOST command, but how is the script output
    displayed back to the browser?
    FLM
    [email protected]
    You can probably still use the host to sqlplus, but this time it will run on the Forms Server.
    You just need to make sure that the dynamic SQL files are uniquly identified for each customer.

  • Need Advice on improving script processing and ensuring completion

    Hi,
    I have a program in which I am running a number of for loops which are doing a number of different things.  I pull in data from an xml file and then step through that data to dynamically create arrays, populate the arrays, and create and modify movie clips.
    The program I'm building is similar in scope to one I developed in Director many years ago, and in that environment we had to actually put breaks in using timers to ensure that the data would be processed and that the system wouldn't choke.
    What I'm seeing with this flash version of the application is similar and I suspect the same.  Basically, when navigating from the frame where the scripts are processed to the frame where the movie clips are displayed, there are times when it works perfectly and times when things are out of whack.  I put in a 5 second delay (arbitrarily) to see if this would resolve the issue and on my system at least it does.  But I need some advice on coming up with a real solution.
    Any inofrmation you can give me about processing particularly as it relates to for loops and dynamic creation of elements (whether arrays or MCs) as well as making sure that everything is done woudl be greatly appreciated.
    Best regards,
    Chris McLaughlin

    Hi Andrei,
    First . . . thank you so much for your message.
    I'm sure that there is something in the code architecture that's amiss.  If you'd be kind enough to take a look and see if anything blatant jumps out at you I would be very grateful.  I'm just not seeing it.
    Here it is:
    stop();
    import flash.utils.*;
    import flash.events.MouseEvent;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    pageBlock_mc.mandatoryWarning_mc.visible = false;
    sp1Mask_mc.height = 10;
    scrollPane1_mc.mask = sp1Mask_mc;
    //************************************************VARIABLES****************************************************
    var tl:MovieClip = this;
    var prd:int;
    var seg:int;
    var sld:int;
    var ICPcontent:XML;
    var productCount:Number;
    var productName:String;
    var segmentTitle:String;
    var slideURL:String;
    var productsArray:Array;
    var AssuritySegmentsArray:Array;
    var ComfortisSegmentsArray:Array;
    var ComfortisMandatoryArray:Array;
    var SWFsArray:Array;
    var videosArray:Array;
    var ReconcileSegmentsArray:Array;
    var TrifexisSegmentsArray:Array;
    var showArray:Array = new Array;
    var tempArray:Array;
    var subNum:Number = 1;
    var textHeight:Number;
    var xmlLoader:URLLoader = new URLLoader();
    var whichMajorBucket:String;
    var whichDeck:String;
    var fct:String;
    var segSlide:String
    var breakTimer:Timer;
    breakTimer = new Timer(500, 1);
    breakTimer.addEventListener("timer", doNext);
    function doNext(event:TimerEvent):void {
         trace("DO NEXT TRIGGERED and fct = " + fct);
         switch(fct) {
              case "assurity":
              trace("buildAssuritySlides()");
              buildAssuritySlides();
              break;
              case "comfortis":
              buildComfortisSlides();
              break;
              case "reconcile":
              buildReconcileSlides();
              break;
              case "addListeners":
              Object(this).startAssurity_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).startComfortis_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).startReconcile_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).pickAssurityDeck_mc.core_btn.addEventListener(MouseEvent.MOUSE_DOWN , goToBuild)
              Object(this).pickAssurityDeck_mc.quickStart_btn.addEventListener(MouseEvent.MOUS E_DOWN, goToBuild)
              trace("last timer triggered");
              fct = "ready?";
              breakTimer = new Timer(5000, 1);
              breakTimer.addEventListener("timer", doNext);
              breakTimer.start();
              break;
              case "ready?":
              Object(this).pageBlock_mc.visible = false;
              break;
    xmlLoader.addEventListener(Event.COMPLETE, loadContent);
    xmlLoader.load(new URLRequest("data/elancoICP.xml")); // + "?" + Math.random())
    //xmlLoader.load(new URLRequest("data/elancoICP.xml" + "?" + Math.random()));
    function loadContent(e:Event):void {
    XML.ignoreWhitespace = true;
    ICPcontent = new XML(e.target.data);
    productCount = ICPcontent.product.length()
    trace("the product count = " + productCount);
    productsArray = new Array;
    for (var i:int = 0; i<productCount; i++){
         productName = ICPcontent.product[i].productName.text();
         productsArray.push(productName);
         trace("productsArray = " + productsArray);
         buildAssurity();
    function buildAssurity(): void {
         tempArray = new Array();
         AssuritySegmentsArray = new Array();
         for( var a:int = 0; a < ICPcontent.product[0].segmentName.length(); a++) {
                   segmentTitle = ICPcontent.product[0].segmentName[a].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                   subNum++;
                   AssuritySegmentsArray.push(segmentTitle);
                   tl["Assurity_" + segmentTitle + "_Array"] = new Array();
                   tl["Assurity_" + segmentTitle + "_Array"].name = "Assurity_" + segmentTitle + "_Array"
              if(a == ICPcontent.product[0].segmentName.length()) {
                   buildComfortis();
    function buildComfortis(): void {
         ComfortisSegmentsArray = new Array();
         for( var c:int = 0; c < ICPcontent.product[1].segmentName.length(); c++) {
                   segmentTitle = ICPcontent.product[1].segmentName[c].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                                   subNum++;
                   ComfortisSegmentsArray.push(segmentTitle);
                   tl["Comfortis_" + segmentTitle + "_Array"] = new Array();
                   tl["Comfortis_" + segmentTitle + "_Array"].name = "Comfortis_" + segmentTitle + "_Array"
         ComfortisMandatoryArray = new Array();
         var mandatory:String;
         for(var cm:int = 0; cm < ICPcontent.product[1].mandatorySlides.slide.length(); cm++) {
              mandatory = ICPcontent.product[1].mandatorySlides.slide[cm].text();
              ComfortisMandatoryArray.push(mandatory);          
         SWFsArray = new Array();
         var SWF:String;
         for(var s:int = 0; s < ICPcontent.product[1].SWFs.slide.length(); s++) {
              SWF = ICPcontent.product[1].SWFs.slide[s].text();
              SWFsArray.push(SWF);          
         videosArray = new Array();
         var video:String;
         for(var v:int = 0; v < ICPcontent.product[1].Videos.slide.length(); v++) {
              video = ICPcontent.product[1].Videos.slide[v].text();
              videosArray.push(video);          
         if(c == ICPcontent.product[1].segmentName.length()) {
              buildReconcile();
    function buildReconcile():void {
         ReconcileSegmentsArray = new Array();
         for( var r:int = 0; r < ICPcontent.product[2].segmentName.length(); r++) {
                   segmentTitle = ICPcontent.product[2].segmentName[r].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                                   subNum++;
                   ReconcileSegmentsArray.push(segmentTitle);
                   tl["Reconcile_" + segmentTitle + "_Array"] = new Array();
                   tl["Reconcile_" + segmentTitle + "_Array"].name = "Reconcile_" + segmentTitle + "_Array"
         trace("assurity segments = " + AssuritySegmentsArray);
         trace("comfortis segments = " + ComfortisSegmentsArray);
         trace("reconcile segments = " + ReconcileSegmentsArray);
         var sp1level:Number = scrollPane1_mc.numChildren - 1;
         trace("sp1level = " + sp1level);
              if(r == ICPcontent.product[2].segmentName.length()) {
                   fct = "assurity"
                   breakTimer.start();
    function buildAssuritySlides(): void {
         trace("buildAssuritySlides() triggered");
         var aSegLength:Number = AssuritySegmentsArray.length-1;
         var aSldLength:Number = ICPcontent.product[0].segmentSlides[aSegLength].slide.length()-1
         trace("aSegLength = " + aSegLength + " & aSldLength = " + aSldLength);
         for (seg = 0; seg < AssuritySegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[0].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[0].segmentSlides[seg].slide[sld].text());
                   tl["Assurity_" + String(AssuritySegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == aSegLength) {
                        trace("sld = " + String(sld))
                        if(sld == aSldLength) {
                             trace("IT DOES sld = 8");
                             fct = "comfortis";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function buildComfortisSlides(): void {
         var cSegLength:Number = ComfortisSegmentsArray.length-1;
         var cSldLength:Number = ICPcontent.product[1].segmentSlides[cSegLength].slide.length()-1
         for (seg = 0; seg < ComfortisSegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[1].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[1].segmentSlides[seg].slide[sld].text());
                   tl["Comfortis_" + String(ComfortisSegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == cSegLength) {
                        if(sld == cSldLength) {
                             trace("IT DOES");
                             fct = "reconcile";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function buildReconcileSlides(): void {
         var rSegLength:Number = ReconcileSegmentsArray.length-1;
         var rSldLength:Number = ICPcontent.product[2].segmentSlides[rSegLength].slide.length()-1
         for (seg = 0; seg < ReconcileSegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[2].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[2].segmentSlides[seg].slide[sld].text());
                   tl["Reconcile_" + String(ReconcileSegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == rSegLength) {
                        if(sld == rSldLength) {
                             trace("IT DOES");
                             fct = "addListeners";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function checkAslide(): void {
         trace("checking the Comfortis Mode of Action slides")
         trace ("array = " + tl["Comfortis_" + String(ComfortisSegmentsArray[0]) + "_Array"][0]);
    function goToBuild(event:MouseEvent):void {
         switch(event.target.name) {
              case "startAssurity_btn":
    //          whichMajorBucket = "Assurity";
    //          if(pickAssurityDeck_mc.y == 275) {
    //               trace("it's hidden");
    //               var showTween:Tween = new Tween(pickAssurityDeck_mc, "y", Strong.easeOut, 275, 392, 1, true);
    //          } else {
    //               var hideTween:Tween = new Tween(pickAssurityDeck_mc, "y", Strong.easeOut, 392, 275, 1, true);
              break;
              case "quickStart_btn":
              //whichMajorBucket = "Assurity";
    //          whichDeck = String(AssuritySegmentsArray[0])
    //          gotoAndPlay("builder");
              break;
              case "core_btn":
              //whichMajorBucket = "Assurity";
    //          whichDeck = String(AssuritySegmentsArray[1])
    //          gotoAndPlay("builder");
              break;
              case "startComfortis_btn":
              whichMajorBucket = "Comfortis";
              whichDeck = "Core";
              gotoAndPlay("builder");
              break;
              case "startReconcile_btn":
              //whichMajorBucket = "Reconcile";
    //          whichDeck = "Core";
    //          gotoAndPlay("builder");
              break;

  • Need to run Shell script based report from EM Grid Control

    Hi DBAs,
    I have a monitoring script for host which I want to run from OEM and send me the email report every day. I have configured soem reports for SQLs but not sure how can I get it working using OEM. Looking for your help. I am using Grid Contro Version 10.2.0.4.
    Regards
    -Samar-

    OK.. I was under the impression that u have a script ready :)
    Now u different way's to implement.
    1.If it's an application which has a login page url,u can monitor URL from OEM with HTTP ping
    2.U can have a job where it will check for process using ps -ef and set that job will fail if it doesn't get N no.of processes somthing like that.

  • Shell script for DB backup

    HI,
    i have written some java code Database backup but there are some problems with that so now i need to write shell script for db backup.
    what i was doing in java code i was running command like that
    /usr/local/bin/tar cvzf /export/home/monitor/FILE_20091005.tar.gz FILES/*20091005.*which compress the all *20091005* files (myisam table files)
    but after compression file doesn't extract
    so i have to write shell script for that ..... can any body guide me how can i write that kind of script and put it in cron job.
    thanks

    soundar wrote:
    Hi all,
    I have migrated database from 8i to 10gr2.For Backup in 8i, we used a RMAN shell script (scheduled uding cron tab) to backup the database to Tape.(VERITAS BACKUP).
    I am new to 10G.I checked out the options to backup the database using Oracle Enterprise manager DB console.
    http://www.oracle.com/technology/obe/10gr2_db_single/ha/rman/rman_otn.htm#t1d
    I am planning to take a test backup using the steps mentioned inthe above url.Could any one suggest whcih is the best option for database backup,eiether to use Oracle Enterprise manager DB console or thru RMAN shell script for backup..?
    Edited by: soundar on Mar 9, 2010 10:53 PMDear soudar
    I woudn't suggest you to work with EM if you want to be a professional DBA. Start learning RMAN and use CLI instead of GUI
    Those who live by the GUI, die by the GUI

  • Startup shell script help for newbie?

    New to UNIX (linux)... need the bash shell script commands for my r.c local file to start my services when server boots.
    I got my ds, dps and admin server in their respective /opt directories. I need the shell commands to have these start. Of course I can start them manually but when I try a line like this in a script, it doesnt work:
    ./var/opt/sun/directory-server/slapd-dsserver/start-dsserver
    Some path problem or dot thing?

    There are a few other things you may want to consider, such as what the default browser is, are tabs being used, is the page loaded yet, etc, but Safari has a do javascript command in it's scripting dictionary. The following script will open a new document and run your specified javascript, or you can go to their NPR Program Stream Page and download a playlist that will run directly from iTunes.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 335px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    set my_script to "NPR.Player.openPlayer(2, 0, '03-21-2008', NPR.Player.Action.PLAY_NOW, NPR.Player.Type.PROGRAM, NPR.Player.Mode.LIVE)"
    tell application "Safari"
    activate
    set the URL of the front document to "http://www.npr.org/"
    if my page_loaded(20) is false then error numner - 128 -- page not loaded in time
    do JavaScript my_script in document 1
    end tell
    on page_loaded(timeout_value) -- from http://www.apple.com/applescript/archive/safari/jscript.01.html
    delay 2
    repeat with i from 1 to the timeout_value
    tell application "Safari"
    if (do JavaScript "document.readyState" in document 1) is "complete" then
    return true
    else if i is the timeout_value then
    return false
    else
    delay 1
    end if
    end tell
    end repeat
    return false
    end page_loaded
    </pre>

  • Running Shell Script

    Hi all,
    I need to run shell script on one of linux servers while executing some IdM workflow.
    There is no need to manage that server/ provision accounts / reset passwords etc but just to run the script and to process the result.
    I have IdM 8.04 installed on Windows Machine.
    What are my options to achieve that mission?
    Thank You,
    Alex.

    I was considering a situation similar to AD after actions where sometimes we execute a dos batch file for any specific purpose like creating home folder using mkdir. I was thinking on similar lines if your shell script is also for a specifc function similar to the one I mentioned above and if it is applicable in windows environment, you might covert that into a dos batch and do similar to an after action.
    Since you need your shell script to be run in UNIX / LINUX machine, I do not see any other way other than writing a java class and invoke within a wf as it was mentioned by etech or if you are planning on using any of the out of the box resource adapters, the AIX resource adapter reference might help, but I have not worked with that

  • Unix master shell script to run jobs in parallel with dependency

    I need a master shell script which would call the following shell scripts as per below order. Kindly note that if any shell script fails then the master shell script should abort.
    Level 1     PRODUCTS
         SP_ROST_DLY_STG_lD
         SP_ROST_DLY_ITG_lD
    After Level 1 completes run below two shell scripts in parallel:
    Level 2     SP_IDL_EDGE_CON_POSTN_STG_Ld ,     SP_IDL_EDGE_ACCT_POSTN_STG_LD
    After Level 2 completes run below shell scripts as per the seqeunce and in parallel:
    Level 3     SP_IDL_EDGE_ACCT_STG_LD ,     SP_IDL_EDGE_CONT_STG_LD
         SP_IDL_EDGE_ACCT_STG_VAL ,     SP_IDL_EDGE_CONT_STG_VAL
         SP_IDL_EDGE_ACCT_ITG_Ld ,     SP_IDL_EDGE_CON_ITG_Ld
    After Level 3 completes run below shell scripts as per the seqeunce and in parallel:
    Level 4     SP_IDL_EDGE_CONT_POSTN_ITG_LD ,     SP_IDL_EDGE_VISITS_LD
         SP_IDL_EDGE_ACCT_POSTN_ITG_LD ,     SP_IDL_EDGE_VISITS_DTL_LD

    can i avoid using set -e and use some other method so that if there is an error in previous job then the next job is not triggered.Sure, but it is ugly.
    The below is not the only way to do this...
    Wrap every place you start another script with:
    $ if ! MYSCRIPT; then
        echo Script MYSCRIPT failed. >&2
        exit 1
    fibut the wrapper for parallel scripts is even worse:
    $ MYSCRIPT &
    $ MYSCRIPT_JOBNO=$!
    $ MYSCRIPT2 &
    $ MYSCRIPT2_JOBNO=$!
    $ MYSCRIPT_STATUS=`wait ${MYSCRIPT_JOBNO}`
    $ if [ ${MYSCRIPT_STATUS} -ne 0 ]; then
        echo Script MYSCRIPT failed. >&2
        exit 1
    fi
    $ MYSCRIPT2_STATUS=`wait ${MYSCRIPT2_JOBNO}`
    $ if [ ${MYSCRIPT2_STATUS} -ne 0 ]; then
        echo Script MYSCRIPT2 failed. >&2
        exit 1
    fi
    ...Now, doesn't a simple 'set -e' look much better?

  • Execute process (shell script) under different user

    Hi,
    is it possible to use the ProcessBuilder oder .exec()-method to execute a shell script under a JVM-different user? I need to start shell scripts for different system users and I don't want to use SUDO or a wrapper script to switch to the required user. I would like to define the user at java level. Is this possible?
    Best regards,
    Thomas

    looking for something like this too.
    currently i am relying on a script in which i have to set the user as:
    "su username -c java_program"
    the problem with this approach is that if youre not running as root, then su asks for a password, thereby halting execution. (tried input redirects and here-docs, (some popular linux tricks), they did not work)
    so you have to be root for the script option to work.
    if anyone can suggest a more "java based" way of executing a process as a different user , thatll be awesome.

  • I need a shell script to move latest archivelogs from one server to another server..

    Hi,
         I need a shell script to move latest archivelogs from one server to another server..
    Thanks&Regards,
    Vel

    ea816fb9-f9ea-45ac-906f-36a8315970d0 wrote:
    Thanks it's really helpfull..
    Now i have pasted a shell script which generates archivelog and shows latest archivelog time..
    just check let me know the answer, that how i need to execute it..
    # Force a logswitch to get the last archivelog to the standby host
    ORACLE_SID=ORCL
    ORAENV_ASK=NO
    . oraenv >/dev/null 2>&1
    SwitchLogfile()
      # Do logswitch 
      RESULT=`echo "Alter system switch logfile;" | sqlplus -S / as sysdba | grep 'System altered'`
      if [ "$RESULT" = "System altered." ]
      then
      export RETURN=1
      else
      export RETURN=0
      fi
      # Do we need to do something with this return value?
      export RETURN
    GetArchiveTime()
      CURYEAR=`date +%Y`
      echo "set heading off;" > temp.sql
      echo "set termout off;" >> temp.sql
      echo "select to_char(first_time,'YYYY-MM-DD HH24:MI:SS') from v\$archived_log where sequence#=(select sequence# - 1 from v\$log where status='CURRENT');" >> temp.sql
      sqlplus -S / as sysdba <
    spool tempres.txt
    @temp.sql
    quit
    EOF
    cat tempres.txt | grep ${CURYEAR} | grep -v grep | awk '{print $1" "$2}'
    #rm -f temp.sql  tempres.sql
    SwitchLogfile
    GetArchiveTime
    You seem to have ignored Dude's VERY good advice and continue to press down this ill-advised path.  If you continue this approach, you WILL have problems at the very time you do not need any additional problems.  Trying to recover your production database at 2:00 in the morning is not the time to be getting errors from rman because it can't find what it needs - because you decided to move them around yourself.
    Please reconsider.

  • Trying to create a shell script to cut/paste files in finder. Help needed.

    I'm trying to create an automator shell script to cut/paste. It'll function exactly like copy/paste. i.e. I'll just copy file/files with command+c like always, but then I'll create an automator which uses the "mv" terminal app to move the files which works exactly like cut paste.
    I need some help since I don't know the syntax for creating shell scripts.
    What I did so far is to do it in automator with Apple Script which goes like the following:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    tell application "Terminal"
    do script with command "mv \"" & input & "\"" & thePath in window 1
    end tell
    return input
    end run
    This gets the copied file path from clipboard before, as input, and then recognizes the active finder window as thePath so then executes the mv command for the input file to the thePath window.
    It doesn't work as expected since it connects both file/window paths into a single path instead of leaving a space between them so the mv command can't recognize two separate paths.
    What's the correct syntax for that line
    do script with command "mv \"" & input & "\"" & thePath in window 1
    to leave a space between input and thePath under the mv command?
    Also this requires the terminal app to be open in the background.
    After I get this to work I want to do the exact same thing using shell script within automator, so I won't need Terminal to be open all the time.
    And the next step will be to cut/paste multiple files/folders but that should be easy to do once I get the hang of it.

    Try using:
    on run {input, parameters}
    tell application "Finder"
    set theWindow to window 1
    set thePath to quoted form of (POSIX path of (target of theWindow as string))
    end tell
    do shell script "mv \"" & input & "\" " & thePath
    return input
    end run
    (45977)

  • Need a shell script to backup archive log daily

    Hi All,
    We need a shell script to backup the archive logs daily after shutting down the concurrent manager and once the backup is completed, needs to start the concurrent manager through the script itself, if you have any ideas or sample scripts, please provide and help us.
    The objective is to backup the daily archive logs with out any loss of data.
    Thanks,

    I do not have a similar script to share, sorry. However, you may review the following links/notes:
    Note: 137181.1 - RMAN Backup Shell Script Example
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=137181.1
    Recovery Manager (RMAN) Manuals
    http://www.oracle.com/pls/db102/homepage

Maybe you are looking for

  • Error in uploading a pdf file

    Hi all,         we want to attach a pdf file to a tasklist,during upload all the pages are not going to upload only few pages are uploading.what might be the problem?

  • Itunes seems to have lost the ability to play purchased videos

    Before posting here, I've searched all over the place for a solution to this problem, I found many people who have very similar issues, some solved them, but their solutions haven't worked for me, others with problems closer to how'd I'd describe min

  • Web content interactivity puzzler

    Hi all, Hope someone can offer me a way forward on something I'm puzzling over. We're currently developing an App which (we hope!) involves a clickable map with various points of interest, so that when the user taps on one, the visible content in a s

  • Member acces profile error(A table name, specified in an sql command)

    Hi friends, In my bpc application(A) below 3 dims are secure dims. 1. entiiy  (std) 2. category (std) 3. location (custom dim) while defining one member access profile, Read Only      : CATEGORY 100 Read & Write      : CATEGORY 200,500 for whatever c

  • Question about scope!!

    Hi ~ I have a question about scope. for example primitive character variable ("char") what is principle upon which it is based? How can scope implemented? Please explain at low level in detail.. thanks