Try to understand "-" in script

hi,
does anyone kindly explain what "-" is and how to use "-" in shell script?
for example
trap "ls -a" 2
trap - 2
How to understand here "-"?

# cat junk
#!/bin/ksh
trap "echo 'I said do not interupt me, dummy!'" 2
echo 'Do not interupt me...'
        I=0; while ((I<3)); do ((I+=1)); sleep 60; done
trap - 2
echo '\nOk, leave whenever you want!'
        while (true); do echo "the current time is `date`"; sleep 60; done
# ./junk
Do not interupt me...
^CI said do not interupt me, dummy!
^CI said do not interupt me, dummy!
^CI said do not interupt me, dummy!
Ok, leave whenever you want!
the current time is Thu May 15 22:16:56 CDT 2008
^C#

Similar Messages

  • Dear concern try to understand what i am asking to you that some one calling me and my phone is ringing or that time i am nt using my phone that is in lock mode that time if i want to disconnect that call without using sleep/wakeup botton.So tell me

    Dear concern try to understand what i am asking to you that some one calling me and my phone is ringing or that time i am nt using my phone that is in lock mode that time if i want to disconnect that call without using sleep/wakeup botton.So tell me another way to disconect that call in given situation.kindy suggest.

    3 topics with the same question?
    Please stop creating new topics & start using the ones you already created, they are listed under your activity (click your own username).
    kumar kalptaru

  • When I try to open a script, it won't launch

    I can't open scripts. I just get blank, gray page. help

    Hi there,
    Can you please clear your browser’s cache and try  again.
    Find more info on clearing browser cache here...
    http://www.wikihow.com/Clear-Your-Browser's-Cache
    -Shalini

  • ExtendScript try/catch difference when script ran from ESTK and Illustrator

    Hello,
    I've written an ExtendScript for Illustrator using the ExtendScript ToolKit (ESTK).  This scripts works really well when running it in Illustrator from the ESTK (using the target application functionality).
    However when I run it directly within Illustrator (by selecting it from the dropdown File > Scripts) I get a run time error.  Is this normal?  Should I expect differences when running the script in these two different ways?
    The error is in this function...
    ```
    function itemUsable (arr, item) {
        var usable = true;
        try {
            arr[item];
            usable = true;
        } catch(e) {
            $.global.alert(e);
            usable = false;
        return usable;
    ```
    The point of the code is to get around Illustrator's issue of throwing errors when accessing properties that don't always exist.  Ran from ESTK the try/catch statement catches the error "No such element" and then sets the function to return false.
    When ran directly from Illustrator the error message fires but the try/catch doesn't seem to stop the script from exiting.
    The only difference I can see is when running the script from ESTK the dropdown menu next to the application target dropdown is always (and has only the option) "main".  Running the script directly from Illustrator, when the error is thrown this dropdown option is set to the value "transient".
    See this screenshot for an example what I mean
    Any help would be much appreciated.
    Thanks,
    /t

    Thanks Trevor.
    So it turns out that a script executed in Illustrator from ExtendScript has a different debug mode compared to a script that is opened directly by Illustrator.  Useful to know.

  • Expecting a cartesian join but did not get 1 (try to understand what is hap

    Hello Oracle XML DB gurus,
    I have successfully registered my schemas and inserted about 10,000 XML documents into the repository. Now I need to start reporting on the data that is in the documents. Following is a simplified form of my set-up.
    I have a table that contain a XML_TYPE column that is schema based.
    I will call the table TEST_REF it has two columns: ID number (PK) and XML_DOC which is of the foo schema.
    foo schema has the following structure (foo is unbounded).
    <DataSet>
    <fooList>
    <foo>
    <val1></val1>
    <val2></val2>
    </foo>
    <foo>
    <val1></val1>
    <val2></val2>
    </foo>
    </fooList>
    </DataSet>
    What I would like to do is select the XML document that I want to extract data from using the ID column. After that I wanted to be able to select all of the data values in /DataSet/fooList/foo from that document (val1 & val2).
    I was able to do just that using the following query. However, I do not understand why the following query does not give me a cartesian product when I try to operate on mulitple documents. I'm actually getting exactly what I want, which are the individual data values from each document. I just need to understand what is going on. Does the table() function when used in this fashion perform a inner join for you? I hope this make sense.
    select doc.id, extractvalue(Column_value,'/foo/val1') as VALUE1,
    extractvalue(Column_value,'/foo/val2') as VALUE2
    from test_ref doc,
    table(XMLSequence(extract(doc.XML_DOC,'/DataSet/fooList/foo'))) foobar
    where doc.id ='1'
    ------------------------ second where causes the I thought would cause a cartesian join--------------------
    where doc.id in (1,2)
    Sample data and results when using second where clause:
    ID=1
    <DataSet>
    <fooList>
    <foo>
    <val1>2</val1>
    <val2>22</val2>
    </foo>
    <foo>
    <val1>4</val1>
    <val2>44</val2>
    </foo>
    </fooList>
    </DataSet>
    ID=2
    <DataSet>
    <fooList>
    <foo>
    <val1>1</val1>
    <val2>11</val2>
    </foo>
    <foo>
    <val1>3</val1>
    <val2>33</val2>
    </foo>
    </fooList>
    </DataSet>
    Results:
    ID Value1 Value2
    1 2 22
    1 4 44
    2 1 11
    2 3 33
    If what I'm asking does not make sense please let me know. I'm a newbe with this Oracle XML DB stuff. However, I really like what I have seen so far!
    Thanks in advance
    Derrick

    It's a correlated join...

  • Try to understand the bequeath process

    Hi,
    I want to understand the bequeath process. As I know, you don't have to use listener to connect the database if you log on the server. You can use the bequeath protocol, right?
    In my rac environment, I have got the following situation.
    1, ps -ef | grep oracle
    oracle 5695 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 5804 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 5956 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    2, echo $ORACLE_HOME
    [oracle@css-rac1 ~]$ echo $ORACLE_SID
    GRIETH1
    3, lsnrctl status
    Service "griethXDB.css-net" has 2 instance(s).
    Instance "grieth1", status READY, has 1 handler(s) for this service...
    Instance "grieth2", status READY, has 1 handler(s) for this service...
    4, sqlplus /nolog
    SQL> conn sys as sysdba
    Enter password:
    Connected to an idle instance.
    SQL>
    5, sqlplus /nolog
    SQL> conn sys@grieth1 as sysdba
    Enter password:
    Connected.
    SQL>
    Why can I without using @grieth1 not to connect the database?
    Message was edited by:
    user318649

    The SID is case sensitive in Unix.
    Your SID appears to be grieth1 as opposed to GRIETH1.
    Please try using grieth1 for your SID.
    Sybrand Bakker
    Senior Oracle DBA

  • Try to understand OWB

    I want to load a data warehouse I have designed and modelled with Erwin with OWB.... and I really have lots of problems to understand how this product works. I have 2 years experience in ETL with data stage mainly (and SQL with oracle, informix and SQL server) but i did not follow any course about OWB and have to load the data within 2 weeks in a small dwh. I have followed this kind of tutorial : http://otn.oracle.com/products/oracle9i/htdocs/9iobe/OBE9i-Public/obe-dwh/html/owb/owb.htm but this is really not enough! I would like to insert text in some fields, dates, do some lookup to load fact tables, some transformation, some loads using if then else,... constraints and derivations (using datastage vocabulary) but I do not have information enough to go further and do not find my way in owb. I also tried using the user guide but this is really not the best reference to try a quick step by step self training with owb. Would you have some reference to do so? Is there not any tutorial,... PLEASE, need help urgently! Thank you in advance!
    Samir Temara : [email protected]

    As for any ETL tool which inevitably contains complex features, it takes some time for the users to familiarize with OWB. The only possible path is the tutorial, mentioned by you, a class or (most useful) -actual implementation experience. A person with 2 years of ETL experience (like yourself) should be able to acquire a reasonable command of the product in 1-2 weeks, and yes you will have to refer to the user guide.
    In a nutshell, to complete the OWB implementation you will have to:
    1.install OWB (and define the OWB design and run-time environments),
    2.define your data sources and design your target data structures in OWB,
    3.define the processes which extract data from the sources, transform it and load the data into the targets called mappings (a mapping usually translates into one or more PL/SQL procedures which will be run in the database),
    4.Deploy the target objects and mappings into the target (run-time) environment. These are database objects like tables, PL/SQL procedures, dimensions etc.
    5.Run the deployed mapping procedures (which will extract data from the source, transform it and load it into the target environment) as needed
    6.Periodically modify and redeploy your mappings and target objects to reflect possible changes in the source or target business rules as well as changes in your technological infrastructure (DB upgrades, OWB upgrades etc.)
    You can find more documentation at the following web site:
    http://otn.oracle.com/products/warehouse/content.html
    Regards:
    Igor

  • Shadows... try to understand them...

    Ok I've posted a few questions over the past 12 hours, ugh up almost all night playing with iWeb.
    I'm making a website for a friend's who owns not only a "biplane rides" business but is also the manager of a circa 1920's grass strip airport (all very cool) I really want it to be "nice"... I'm struggling with the shadow option, sometimes it works and sometimes it doesn't and I'm wondering if its me or the limits of the program.
    I've used the shadow option on text and on pictures - with and without frames. However I have line that divides the FAA Nav information (elevation, open to public, FAA identifier, etc) from the body of the text on the page. It's just a single line. I'd like to add a slight shadow to that and the shadow option does not work. Am I doing something wrong or can you NOT put a shadow on shapes?
    Another shadow issue - when make a text box and then go to inspector and go to the 6th "tab" on inspector with the square and circle on it... if I pick "stroke" and then line and pick one of the dotted lines to outline a text box (this box is going to feature "special discounts" so I want it highlighted). If I chose the shadow option there as I type it puts a shadow on the text. I don't want that, I want the dotted line around the text box shadowed. Can I do that.
    Lastly, I'm using the Darkroom template (the Welcome one) and then trying to customize it some so its not too templatey looking. It has those pictures grouped together in such a way that they all have the same outer border... so when I try to put a shadow around that it does each picture individually (not to mention once in a while I "hit those pix and they move and screw up how difficult it was to line them up). Now that I have them set, can I group the pix together so they are one and then put a shadow around that outer border.
    I'm sorry I can't put the site up yet for you to look at, its going to be on Godaddy and its not set up to upload yet (they said 24-48 hours).
    Susan

    Hello Susan,
    susan-kelly wrote:
    It's just a single line. I'd like to add a slight shadow to that and the shadow option does not work. Am I doing something wrong or can you NOT put a shadow on shapes?
    Yes, you should be able to add shadow to shapes.
    I want the dotted line around the text box shadowed.
    No, it will add the shadow to the text. Put a rectangular shape over the text box and give the rectangular shape a shadow (it will shadow on all 4 lines, if you don't want that : add a line shape on top of the bottom line of the rectangular and add shadow to the line)
    can I group the pix together so they are one and then put a shadow around that outer border.
    Grouping : Not that I know in iWeb '08.
    Instead of clicking on them individually to select them, drag your mouse over all of them so you select them all without risking to move them.
    If 1 picture is overlapping an other (ex. behind the other), shadow will look messy.
    A quick way to avoid this is by "masking" the picture that is overlapping.
    Kind regards,
    Leo
    PS : you may want to publish your website to a folder on your computer just for testing with different browser as not all of them understand the command "shadow"

  • Try to understand Throwable

    I saw some sample codes like:
    [Base Exception Class]
    public class BaseException extends Exception {
    public BaseException() {super();}
    public BaseException(Throwable exception) {
    super();
    this.nestedException = exception;
    }//end constructor
    [Sub Exception]
    public class TestException extends BaseException {
    public TestException(Throwable exception) {
    super(exception);
    public TestException() {
    super();
    [Calling Class]
    public Result getData() throws TestException {
    try {
    connection = ConnectionHelper.getConnection(...);
    } catch (SQLException e){
    TestException te = new TestException(e);
    te.setErrorCode("10000");
    throw te;
    --What is the purpose of passing the e as Throwable in
    new TestException(e);
    It seems to me that if use:
    TestException te = new TestException();
    will also create the object. And
    te.setErrorCode("10000");
    throw te;
    will be just fine. Then why should use the Throwable e to initiate the Object
    TestException? Or what is the usage of use the Throwable?
    Thanks
    Scott

    Throwable is the superclass of Exception (or somewhere up there).
    The purpose is that you catch an exception in your code, but want to throw a new one, but want to include the original one that started it all.
    Generally, I don't normally do that, but it does happen in some places. I've seen this in JSP all the time (what Tomcat does, not what I've done in JSP).

  • Understand "Department Script" in Employee Directory [Adobe AIR app]

    Ok, I ve been bashing my head around for long enough with this simple issue... I hope to find enough info to make good use of a great button in ED.
    The Department link. When viewing an employee's information in ED you can click the employee's department name and will be taken to a new panel that display all other employees in the same department. Wow, I like it....
    As much as it is good to see who else is in a department I wish I could simply use this as a static list because if I don't know the name of the employee in a specific department... well I just can't get there or take advantage of that list....
    So I went, as usual, and though I could just re-use the same script and create a static list...but, as usual, The app is way to tightly knot together that I can't seem to knock out it's relation to the employee....
    I though I would have to go back and find where it starts [IE-    dataProvider="{ department.employeees }"]   and use the dataProvider to populate my new list (in this case a datagrid)....
    Well it doesn't work, and my knowledge is too weak to figure it out as I still struggle with the syntax and it's meaning.... I think I am getting confused mostly by the  [    change="displayEmployee (event.target.selectedItem as Emlpoyee)     ] any part of script related to that change employee thingy just put out and I feel that must be the part that's linking the info to the employee at hand.
    I am out of ideas?!
    where the only way to trigger the department panel list is to open a employee from that department first...
    Here's what i am trying to do....
    Instead of clicking on the department link in the employee bio...i want to click on a button that would open a panel with a static list that never change, like the one i added at the bottom of the screenshot.
    Thank you
    Employee directory files can be found here  :
    http://download.macromedia.com/pub/developer/air/sample_apps/EmployeeDirectory.zip
    More information can be found at the original post that i made here [  http://forums.adobe.com/thread/545756?tstart=0  ]
    I created a new post as it is more clear and will be more usefull to more ppl if we find the solution.
    Thank you, again!

    Hey!
    Here's an example of how to get data from a database using Adobe Flex 3, AIR and SQLite.

  • Error if I try to execute the Script BI Java / Technical configuration

    Hello everybody,
    I get the follow error back, if I try to execute the BI Java / Technical Configuration of BI - Java (repeatable, reproducible):
    Validation Error: Test SLD connection:It was not possible to test the SLD system (SLD_HOST) with the user (SLD_ADMIN)  and its password given in the property sheet. Please verify and retype the values in the corresponding fields. You can also go to visual administrator -> "SID" -> Server xx -> Services -> Configuration adaptor -> CTC -> Propertysheet SystemProperties, make sure that the parameters related to SLD are correctly typed and rerun the template.
    We sure, that the Porperties are the current parameters correct.
    Any ideas ?
    Kind regards
    Stephan Kohler

    Hii Stephan
    I am facing the exact problem as you are did. The SLD connection failed when BI-java template installer. Were you able to solve this? Is the problem due to user missing in the central SLD as in BI ABAP. Please let me know the solution if it had worked for you.
    Thanks, Raj

  • Need to Understand 2 Scripting parameters

    Hi, 
    Can someone tell me what this is doing in script of ActiveSync stats:
    $EASDevices = “”
    $AllEASDevices = @()
    The complete script is:
    ####  Get Mailbox
    $EASDevices = “”
    $AllEASDevices = @()
    $EASDevices = “”| select ‘User’,'PrimarySMTPAddress’,'DeviceType’,'DeviceModel’,'DeviceOS’, ‘LastSyncAttemptTime’,'LastSuccessSync’
    $EasMailboxes = Get-Mailbox -ResultSize unlimited
    foreach ($EASUser in $EasMailboxes) {
    $EASDevices.user = $EASUser.displayname
    $EASDevices.PrimarySMTPAddress = $EASUser.PrimarySMTPAddress.tostring()
        foreach ($EASUserDevices in Get-ActiveSyncDevice -Mailbox $EasUser.alias) {
        $EASDeviceStatistics = $EASUserDevices | Get-ActiveSyncDeviceStatistics
        $EASDevices.devicetype = $EASUserDevices.devicetype
        $EASDevices.devicemodel = $EASUserDevices.devicemodel
        $EASDevices.deviceos = $EASUserDevices.deviceos
        $EASDevices.lastsyncattempttime = $EASDeviceStatistics.lastsyncattempttime
        $EASDevices.lastsuccesssync = $EASDeviceStatistics.lastsuccesssync
        $AllEASDevices += $EASDevices | select user,primarysmtpaddress,devicetype,devicemodel,deviceos,lastsyncattempttime,lastsuccesssync
    $AllEASDevices = $AllEASDevices | sort user
    $AllEASDevices
    $AllEASDevices | Export-Csv $exportpath\ActiveSyncReport.csv
    Hasan

    They are just creating empty varibles so that data can be added to them later in the script.
    The first one
    $EASDevices = “”
    creates an empty string.
    the second one
    $AllEASDevices = @()
    creates an empty array.
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com
    Hi DJ, 
    What is the purpose of empty string. 
    Hasan

  • Guys I need help please read this and try to understand it

    I want to know that what does a new driver has to do with modem that it makes noises like "click click" during the gameplay...
    Right now i am using the old version that came with the box.It is 43.45 that has been released almost an year ago.Believe me guys it works almost perfect no noise and nothing.
    If i come into 2004 then the latest version is 56.72 .I've heard that nVidia has uploaded this driver on april 1st (Happy fool day from nVidia). Thus guys i wish to come into this new year and i want to update my driver,and when i install this driver it will give me trouble from the modem. Couple of more things i have checked and they're the driver that came with the box is by DETONATOR and these days the drivers says FORCEWARE and the second thing is that the old software that comes in CD from nVidia doesnt contain "DIGITAL VIBRANCE" but all new drivers has it. Could this problem is from here? I am totally puzzled first i thought that there is something wrong with the graphic card but when i checked it was modem.When i changed the modem same problem.I changed the slot, same thing. Thought there is a virus or spyware but there was not.Hardware is ok because old version is working fine.
    PLEASE GUYS I NEED ALL OF YOUR SUGGESTIONS DONT IGNORE MY PROBLEM
    GRAPHIC CARD is MSI nVIDIA FX-5200
    MB is MSI 865P-NEO
    Modem is CONEXANT
    One more thing i want to mention
    if i turn on pc and start playing games(any 3D games) will run perfect on any driver whether it is new or oldest. But if i connect to internet with modem and later disconnect it and then start playing games or any 3D presentation the modem starts crying (CLICK CLICK) and this is the same sound that comes when we start connecting(dialing, probably when it gives signal) the internet.
    In this situation i have to completely turn off my pc and also unplugging it (DISCHARGING ELECTRICITY). and then, when i turn on the pc and start any game without connecting to internet everything runs fine (On the new drivers)....
    Now as i have mentioned before i changed the slots removed and even reinstalled.Nothing happens just a click click sound.
    but for the old driver everything runs fine even if i am online and watching 3D presentations or playing games....
    So anybody ????????????????????????

    assuming its a pci one as he suggests it may well be an irq thing
    try playing swap the pci slot with it
    '

  • Try to understand JS function doSubmit

    Hello,
    I'm trying to understand how the APEX built-in function doSubmit() works.
    Function from htmldb_html_elements.js:
    function doSubmit(r){
         flowSelectAll();
         $x_Value('pRequest',r)
         document.wwv_flow.submit();
    } // End doSubmit()
    My question:
    In document.wwv_flow.submit(), what is wwv_flow ? A JS class ? Where is it defined ?
    I guess this code calls the PL/SQL procedure wwv_flow.accept
    Thanks
    Bertrand

    OK !
    sorry I am not a JS master
    The code source of the HTML page contains:
    <form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm" >
    That means that when doSumit is called, the request wwv_flow.accept is sent to the HTTP server
    regards,
    Bertrand
    Edited by: user639808 on 29.04.2009 09:43

  • HI. I am new to Apple, so please try to understand.

    I just purchased the IMAC 26". I am very impressed with it after using Windows for many years. I am looking for an AOL browser that I can install on my IMAC. Does anyone have any suggestions or have you had any luck with with a version of AOL that you could recomend me to install.
    Thanks All
    Carmanhere

    Once you sort out that you don't need any AOL software because the sytem requirements for their software state:
    AOL® System Requirements
    Windows XP, Vista, or 7
    Internet Explorer 7.0, 8.0, or 9.0
    peruse these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac 101: Mac Essentials,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Lion Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

Maybe you are looking for

  • How to change year in iOS7 reminders?

    Hi, for some reasons (beyond my understanding) some of my tasks in "Reminders" show a reminder date from the 1971. I can easily change day and month - but I have not found out how to change the year! Please help, thank you, Christoph

  • A truetype font I want to use in Firefox doesn't appear in the fonts list in Tools/Options/Display

    A font (News Gothic BT) that I want to set via Tools/Options/Content to be the default font for Firefox is not listed in the dropdown font menu on that tab, even though it is in my Windows/Fonts directory on my C:/ drive. The font in question is a TT

  • Help needed with printf function!!!!

    public class Try {public static void main (String[] args) {int a; String b; a = 000002; b = "JSmith"; System.out.printf(b + "%d", a); }}I need a help with the printf function. The result of this small excercise that I just made is: Jsmith2 How do I m

  • I want to compile all of my albums that I have bought

    I have purchased a few Metalica CDs in the past and now they have a box set. How do I purchase the box set without having to pay for the albums I've already bought and paid for?

  • Intensity randomly displays Verizon screen

    My Samsung Intensity will randomly play the "Verizon sound" and show the Verizon screen.  It doesn't happen at any regular time or schedule.  Any idea what it's doing?  I tell my husband it's a tracking/GPS thing...lol  But seriously...what is it?  A