UDM and shell scripts and working with the ENVIRONMENT variable options

In Userdefined metrics you have the ability to pass envronment variables.
I was going to send
DIR=/db/db05/oradata/ORCL/hot
How to handle whats passed to the shell script?
It passes $1 as {DIR=/db/db05/oradata/ORCL/hot}
yes with the brackets. Here I figured it would simply set the DIR environment variable.
Any cool tricks to work with this mess?
Is it meant for perl scripts instead?
Daryl.

Ilmari Aalto wrote:
Hi Darth,
Thanks for your hint! Nevertheless I think it's something more profound, since there's no error etc. For example, should I have the path wrong I assume that OWB would return me some kind of an error when it doesn't find the .sh-file? Isn't there any log-file to see whether the command was executed? It seems like the execution of the User Defined element would be skipped altogether.
Cheers,
IlmariNo, if you don't give an absolute path OWB will not return any error, it just wont do anything at all...

Similar Messages

  • Using a BEFSR41v3 with a WRT110 and will a WRE54G work with the WRT110

    I want to use the BEFSR41 as my main router and use the WRT110 as an access point (wired from the BEFSR41) on the 2nd  floor of my house. Will this work?  Will I lose speed??
    Is the WRE54G compatible (and will it work) with the WRT110?

    If you want to use WRT110 with BEFSR41 then,you need to hardwired the wireless router to the wired router using an ethernet cable.Follow this link to cascade both the router.
    If the Range Expander is version3 then,it should work with WRT110.

  • Modify shell script to work with other folders

    i am trying to modify a shell script that sorts files in a course folder into sub folders by month. I have a shell script that works, but when i try to modify it for another course folder it quits working. can someone let me know what i am doing wrong?
    the working shell script:
    do shell script "
    for f in \"$HOME/Desktop/DWI Annual Report/\"*
    do if [ ! -d \"$f\" ]; then
    x=\"${f%%.*}\"
    i=$((${#x}-3))
    if [ -d \"$HOME/Desktop/DWI monthly/${f:$i:3}\" ]; then
    mv \"$f\" \"$HOME/Desktop/DWI monthly/${f:$i:3}\"
    fi
    fi
    done"
    the nonworking modified script:
    do shell script "
    for f in \"$HOME/Desktop/DOEP Annual Report/\"*
    do
        if [ ! -d \"$f\" ]; then
            x=\"${f%%.*}\"
            i=$((${#x}-3))
            if [  -d \"$HOME/Desktop/DOEP monthly/${f:$i:3}\" ]; then
                mv \"$f\" \"$HOME/Desktop/DOEP monthly/${f:$i:3}\"
            fi
        fi
    done"

    ok here is the applescript that works.
    property total_student : 1
    tell application "Finder"
      set master_path to alias "Users:macbook:Desktop:DWI Annual Report:Annual Report.xlsx"
      set filesWithDWI to get every file of folder ((path to desktop folder) & "DWI Annual Report" as string) whose name contains "DWI"
      repeat with f in filesWithDWI
      my transfer_data(f, master_path)
      end repeat
    end tell
    on transfer_data(child_path, master_path)
      tell application "Microsoft Excel"
      set child_book to (open workbook workbook file name (child_path as string))
      set child_doc to worksheet 1 of child_book
      set master to worksheet "sheet 1" of (open workbook workbook file name (master_path as string))
      set num to 15 --All lists start at index 12 or later, I'm putting 10 to be safe
      set students to {}
      tell child_doc --grab values from child document
      repeat until (value of cell (("A" & num) as string)) is 1
      set num to num + 1
      end repeat
      repeat until (value of cell (("B" & num) as string)) is ""
      set end of students to {namevalue of cell (("B" & num) as string)), driver_idvalue of cell (("C" & num) as string)), DOBvalue of cell (("D" & num) as string)), Ref_Recvalue of cell (("I" & num) as string)), pre_testvalue of cell (("J" & num) as string)), post_testvalue of cell (("K" & num) as string)), cert_idvalue of cell (("L" & num) as string))}
    set num to num + 1
      end repeat
      set startdate to range "C7"
      set classlocation to range "C11"
      set instructor to range "H7"
      end tell
      tell master
      set num to 7
      log (value of cell (("B" & num) as string))
      repeat until (value of cell (("B" & num) as string)) is ""
      set num to num + 1
      end repeat
      repeat with student in students
      set value of cell (("A" & num) as string) to total_student
      set value of cell (("B" & num) as string) to name of student
      set value of cell (("C" & num) as string) to driver_id of student
      set value of cell (("D" & num) as string) to DOB of student
      set value of cell (("H" & num) as string) to pre_test of student
      set value of cell (("I" & num) as string) to post_test of student
      set value of cell (("J" & num) as string) to cert_id of student
      set value of cell (("f" & num) as string) to startdate
      set value of cell (("E" & num) as string) to classlocation
      set value of cell (("G" & num) as string) to instructor
      set value of cell (("K" & num) as string) to Ref_Rec of student
      set num to num + 1
      set total_student to total_student + 1
      end repeat
      end tell
      save child_book
      close child_book
      save active workbook in master_path
      close active workbook
      end tell
    end transfer_data
    do shell script "
    for f in \"$HOME/Desktop/DWI Annual Report/\"*
    do
        if [ ! -d \"$f\" ]; then
            x=\"${f%%.*}\"
            i=$((${#x}-3))
            if [  -d \"$HOME/Desktop/DWI monthly/${f:$i:3}\" ]; then
                mv \"$f\" \"$HOME/Desktop/DWI monthly/${f:$i:3}\"
            fi
        fi
    done"
    It takes the class rosters and copies the information from the class roster to the annual report and then moves the file to the monthly  folder and files it in the appropriate months folder based on the last three letters of the file name.

  • I often rely on my Norton Toolbar for sites, and it does not work with the new updates. Can I uninstall recent Mozilla updates until this add-on works with Mozilla, or am I stuck? Thanks!

    It's probably really easy to figure this out and uninstall the updates but, well, I'm slightly tech-illiterate! I use my Norton Toolbar a lot for those sites I visit infrequently, and this non-compatibility issue is the same reason I stick with Mozilla over Chrome, but now I can't even use my Norton information with Mozilla. Thanks.

    http://community.norton.com/t5/Norton-Internet-Security-Norton/Norton-Toolbar-not-compatible-with-FF-4-0-1/td-p/442788

  • I am travelling to the Philippines next week and I have been told my iphone and ipad chargers will work with the 220v there.  Do I need to be concerned and buy any type of converter?

    I am traveling to the Philippines next week and am confused on whether I need to buy a converter to be able to charge my Iphone (and Ipad).  I was told I did not as the chargers were universal and automatically converted anywhere from 100 to 240v depending on what you plug into. 
    I would just like some more confirmations if any one has traveled internationally.
    Thank you.

    No, but most international airports I have been to have convenience stores that sell the plug adapters.  And there are always other shops with the adapters so it is easy to get exactly what you need after you get there.

  • Is there a way to export all of my music from my hard drive to an external drive, connected to my computer and have iTunes still work with the music library located on the external drive?

    I do not have enough room on my hard drive for all of my music collection and want to export the music files to my external 300GB hard drive rather than purchase and configure a new, larger hard drive for my computer.  Can I export all of my music library to the external drive and configure iTunes to always store music there, and operate seemlessly with the music library on the external drive?

    http://www.wideanglesoftware.com/touchcopy/index.php

  • Strange- A 1" horizontal strip on the screen (which includes the tabs + 0.5cm above and below) does not work with the mouse pointer, only with firefox

    The mouse wont click anywhere over a 1" strip that includes the area where the tabs are lined, and extends 0.5cm above and below this. So, to open or close a tab I can only use Ctrl T or Ctrl W respectively. And, for ex, I cannot click on the top most line on Facebook (which has the Home, messages, news feeds options etc) or that of Twitter, and so on. I have used Mozilla Firefox all my life and this has never happened before. I don't have this problem with any other browser like Internet explorer or Google Chrome. I find it very strange.

    Both the Yahoo! Toolbar extension and the Babylon extension have been reported to cause this issue. Disable or uninstall those add-ons.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • HT4769 10.6.8 and FCP7 will FCP7 work with the Mavericks OS?

    thanks in advance

    Purchase Snow Leopard install disk.
    http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
    Info regarding Windows
    http://support.apple.com/kb/TS3648

  • The photos in my IPhoto have all become mini-thumbnails and I can't open or edit them. When I print the image it comes out normal size.  How do I get the thumbnails back to the standard size and be able to work with them?

    The photos in my IPhoto have all become mini-thumbnails and I can't open or edit them. When I print the image it comes out normal size.  How do I get the thumbnails back to the standard size and be able to work with the photo files?

    What version of iPhoto and system are you running?  On the guess that you're running the latest iPhoto, 9.4.2, Try the following:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the thumnails, Option #2.
    2 - It may take 2-3 attempts so don't give up after only one attempt.
    OT

  • Do both of Apple Store's iPod power adaptors work with the new Touch 2G?

    Hi,
    Many thanks in advance for your attention.
    Looking to to get an Apple USB power adaptor for the iPod Touch 2G.
    In the Apple Store, two are listed, one smaller (and newer) than the other. In the newer one, the prongs are not retractable; in the larger (older) one, they are.
    1. Does anyone know if the larger (and older) power adaptor works with the iPod Touch 2G USB-only interface?
    2. I know that many power adaptors and speakers and car adaptor sets, etc. in the past had a combo Firewire/ USB power interface. That is why the new iPod Touch 2G (or iPhone 3G) does not charge up or power up with these speakers and chargers, etc. (Speakers such as the original Bose Sound Dock).
    3. Is it true that the older (larger) power adaptor works better in all kinds of power situations (different outlets, etc. in different countries); that the older (larger) power adaptor is more travel-versatile? The Apple store perhaps notes a difference, noting that the newer power adaptor works only with USA-style outlets. I see no such note with the older adaptor.
    4. Finally, does anyone know of a USB-only interface that would work with the iPod Touch 2G that is not Apple's (and perhaps not as insanely priced)?

    Many thanks for further clarifying.
    I don't know 100% for sure that the Apple USB cable for the iPod Touch is different than the Apple USB cable for the iPod Touch 2G.
    But:
    I have read (somewhere) that the tiny pin connectors are different. That is why an iPod Touch 1G could be charged by (for example) a Logitech mm50 Speaker set and an iPod Touch 2G cannot.
    An iPod Touch 2G can still connect to the Logitech mm50 Speaker set. It will still play and you will hear music. But it is no longer charging. And I have read of iPod Touch 2Gs getting very hot in these cradles. That can't be good for the poor iPod in the long run.
    So for the Apple USB power adaptors to work, (which both came out before the iPod Touch 2G), they must have some override or blocked pin if they can work with both generations of iPod Touches.

  • Error with dbms_scheduler and shell script execution

    Hi,guys.
    I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
    DB version: 10g
    And my scripts:
    Shell scripts (permisons 755):
    #!/bin/ksh
    export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
    export ORACLE_BASE=/home/oracle/product
    export ORACLE_SID=zabbix
    export ORACLE_HOME=/home/oracle/product/db_home
    ${ORACLE_HOME}/bin/rman<<EOF
    connect target /
    run {backup recovery area delete all input;}
    EOF
    {       echo "From:[email protected]"
            echo "To: [email protected]"
            echo "Subject: Recovery area"
            echo 'Content-Type: text/html'
            echo
            echo '<html><body><table border="1" cellspacing="1">'
            echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
            echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
            echo "</table></body></html>"
    } | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
    And below pl/sql script:
    begin
      DBMS_SCHEDULER.CREATE_JOB
      job_name => 'FLASH_RECOVERY',
      job_type => 'EXECUTABLE',
      job_action => '/home/oracle/backup/test.sh',
      start_date => sysdate,
      job_class => 'DEFAULT_JOB_CLASS',
      enabled => TRUE,
      auto_drop => FALSE,
      comments => 'FLASH RECOVERY USAGE AREA backup and delete'
      END;
      /And this job execution:
           begin
               DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
           end;What can be wrong? For me, I think it's something with permisions.
    I hope you got my idea and could help me.
    Tom
    Edited by: safazaurs on 2013.18.2 22:16

    There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.

  • How to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also

    how to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also

    032ee1bf-8007-4d76-930e-f77ec0dc7e54 wrote:
    how to run 3 job(a,b,c) parallel in unix shells script and after will complete d will start  and we have to handle the error also
    Please don't overwhelm us with so many details!  
    Just off the top of my head ... as a general approach ... something like
    nohup proca
    nohup procb
    nohup procc
    while (some condition checking that all three procs are still running ... maybe a ps -ef |grep  )
    do
    sleep 2
    done
    procd
    But, we'd really need to know what it is you are really trying to accomplish, instead of your pre-conceived solution.

  • 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

  • Hello, I've updated the iPhone I have got I have a problem I hope you respond to some of the applications no longer work, such as the safari and skype and many applications are no longer working with the ios7.0.4

    Hello, I've updated the iPhone I have got I have a problem I hope you respond to some of the applications no longer work, such as the safari and skype and many applications are no longer working with the ios7.0.4

    Standard troubleshooting...
    1. Try a Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    2. Try a Reset by pressing the home and sleep buttons until you see the Apple logo. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    3. Remove apps from Recently Used (multi-tasking) list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Swipe up on the app preview card to remove it from the list
    - Press the home button when done.
    4. If still a problem restore with your backup.
    5. If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    6. If still a problem, it's likely a hardware issue.

  • I changed my sim on my iPhone n reconfigured iMessage, it configured with my number but when i sign in with my apple id it says username/password is wrong while in all other things like FaceTime, App Store it worked with the same id and password

    i changed my sim on my iPhone n reconfigured iMessage, it configured with my number but when i sign in with my apple id it says username/password is wrong while in all other things like FaceTime, App Store it worked with the same id and password..
    can anyone help me to solve this issue

    i just opened my ipad, started my apple account/I.D. and realized I put the wrong e mail. I was having trouble correcting my I.D on the Ipad so I went to my laptop and make the proper changes/slash e mail address I wanted for my apple ID. I got back to my ipad and try to download an app I can't because I have to sign in my apple account and I can't because it still has the irrelivant I.D/email address..
    So, i did what you said.. went to setting>app store> tapped on my e mail.. it asked me to sign in (with my invalid emails address showing). I signed in with the password I had created. It said "incorrect".. I went to reset password. I reset password, tried to sign in and it says again "unvalid password".. this is getting irritating.  I have been asking and no one knows what to do.

Maybe you are looking for

  • FCP7 with snow leopard - choppy playback in monitor

    Ive been fine running fcp6 with a jvc 1080 hd monitor connect via DVI from my MBP duo intel 2.4 (4 gigs ram) its not the fastest setup but its been fine. ive noticed my playback into my monitor is always choppy now since upgrade to fcp7 and snow lep.

  • Regarding Updating Purchase order status

    Hi, Could any one tell me how we relate equipment(IE02/IE01-EQUNR) with purchase order(AUFK-AUFNR). how we will find that for a single equipment how many purchase orders are existed. and i want to update user status in purchase order could any one te

  • Creating new versions and file size?

    Hello. My understanding is creating new versions in Aperture consumes very little file space (i.e., for adjustments, etc). I'm finding I like to have the "create new version" property enabled so I can have multiple choices in a stack per image in my

  • JOptionPane troubles

    Hey, I am trying to make a list using JOptionPane so that the user is able to select a string in this list, press ok, and then have that string returned to me. This works fine, and the line of code I've used is.... removeItem = (String)JOptionPane.sh

  • Drop ship/Third Party order processing configuration in SNP

    This is in continuation of thread Configuring Direct/Drop Shipment in APO Is there any clean way of implementing drop-shipment scenario ? Most of the technical solutions we have been able to come up with are either too complicated or not very user fr