Sed help / extracting useful bits from a line with sed

I need to parse some log files extracting only the numerical parts of interest.  Example line:
x264 [info]: SSIM Mean Y:0.9689320 (15.077db)
Two goals here:
1) Capture the number after the "Y:" --> 0.9689320
2) Capture the number in () without the db --> 15.077
I thought I'd attack it using sed to find anything up to Y: and delete it, then anything after a space and delete it, but find myself unable to do it.  Suggestions are welcomed.  I can do it with awk/sed combo but want to learn a better way.
awk '{print $5}' | sed 's/Y://'
Last edited by graysky (2011-04-10 17:35:21)

@graysky - As others have said use sed backreferences. Here is an another example.
sed 's/^.*:\([[:alnum:]]*\.[[:alnum:]]*\) [^\(]*(\(.*\)db)[^\)]*$/\1 \2/'
Note: disraptor's regex is much easier to read. I'd use it! I just whipped this up before I saw his
In:
echo "x264 [info]: SSIM Mean Y:0.9689320 (15.077db)" | sed 's/^.*:\([[:alnum:]]*\.[[:alnum:]]*\) [^\(]*(\(.*\)db)[^\)]*$/\1 \2/'
Out:
0.9689320 15.077
In awk: (One way of doing it!)
mawk '{gsub(/[Y\:\(\)db]/,""); print $5,$6}'
In:
echo "x264 [info]: SSIM Mean Y:0.9689320 (15.077db)" | mawk '{gsub(/[Y\:\(\)db]/,""); print $5,$6}'
Out:
0.9689320 15.077
This was quick but I hope it gets you on the right path
Edit:
How about just grep?
echo $(grep -o '[0-9]\.[0-9]*')
In:
echo "x264 [info]: SSIM Mean Y:0.9689320 (15.077db)" | echo $(grep -o '[0-9]\.[0-9]*')
Out:
0.9689320 5.077
Cheap, but I'd thought I would add it anyway!
P.S. Here is the full way to extract both numbers using awk's substr function as disraptor mentioned before.
mawk '{print substr($5,3),substr($6,2,6)}'
Last edited by harryNID (2011-04-11 20:08:31)

Similar Messages

  • New path-layers from every line with pen tool?

    Hi! I'm currently using Illustrator CS6 as a test version and when I use the pen tool to make a beaver (school assignment), it all end up in one layer. I want to have a new path-layer from every line with the pen tool, so I can remove lines in the layer panel too. At the moment it's one layer that have a picture of a beaver and I can't see the individual lines I've drawn. When I used CS5 recently I didn't have this problem.
    Is it a setting I can change or does it have something to do with the news in CS6?

    If you want to see a "layer" for every object change the Layer Panel display by choosing Panel Options from the Layer Panel Menu. In the lower section of the panel options window, make certain Groups and Objects are both checked. You'll then see a "layer" for each object.
    I am quoting "layer" here because technically they aren't layers. They look like layers and are in the Layer Panel, but they don't exactly allow the options which actual Layers allow. You will be able to select and move the objects in the panel this way however.

  • How can I fill structure from the line with contetnt of a XML file inside?

    How can I fill structure from the line with contetnt of a XML file inside?
    I have array of lines with XML documents inside. All XML's have the same structure.
    I need to fill array of structures (with the same structure like given XML's) from data of these XML's.
    How can I do this? I am trying Transformation with ora:parseEscapedXML, but receive error: "XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_1.xsl", bpws:getVariableData("ProcessedFiles"))", the reason is javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Could not find function: parseEscapedXML.
    Please verify the xpath query."

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • Help: Extract OLE object from 8i (long raw) to a server file folder

    Posting here because most of the technical discussion I have found are in this group (Forms).
    I have an 8i db with workpapers(.doc,.xls,etc) stored in a Long Raw column wrapped in OLE that were collected using forms. The DB is maintained on a Sun Solaris platform.
    I need to extract the documents and write each one to a server folder as a .doc or ,xls without any OLE details.
    Is this possible? How?

    As far as I know you have to use OLE Item to work with the information. Unfortunately there is not any standart way to extract a source document from OLE. Some applications such as Word, Excel support OLE Automation, so you could use OLE2 package to save the document as a file, that is the easest way. But others don't, so you may have to use an undocumented way to extract a document.
    Take a look at the following thread:
    Subj: 6i to 9i Ole to LOB translations, How do you know the App. server?
    Re: 6i to 9i Ole to LOB translations, How do you know the App. server?
    P.S. If you can't extract some types of your documents, please let me khow.
    P.P.S. To extract a document through OLE2 package you could use something like the following. /I'm not sure the code is correct/:
    DECLARE
    handle ole2.obj_type;
    BEGIN
    ACTIVATE_SERVER('OLE1');
    handle := forms_ole.get_interface_pointer('OLE1');
    BEGIN
    -- Save a document to disk
    Args :=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(Args, 'C:\test.doc'); -- file name
    OLE2.INVOKE(handle, 'SaveAs', Args);
    OLE2.DESTROY_ARGLIST(Args);
    EXCEPTION WHEN OTHERS THEN
    Message('Error');
    END;
    -- OLE2.RELEASE_OBJ(handle);
    END;

  • [HELP] I use Skype from two computers and i notice...

    Sorry for reposting this topic, but it didn't appear on the forum.
    Hey there.
    I use skype from two computers.
    Last week i blocked a contanct from computer1 and yesterday i unblocked it from the same computer.
    So i noticed that after i unblocked this contact, it still appears at my homepage with his picture, info and everything, BUT only from computer1.
    When i use computer2, this contact appears at my contacts, but only with his skype name (the one he uses to log in) and not with his display name. Also, i can't see his picture or any other information. It just appears offline, with his log-in name and with no picture. That's all.
    So what's going on? Why can i see everything normally from computer1 but not from computer2?
    P.S.1 99% he blocked me too, but i have no idea whether he unblocked me or not.
    P.S.2 I know my english is horrible, sorry for that.

    HolyCrap wrote:
    Sorry for reposting this topic, but it didn't appear on the forum.
    Hey there.
    I use skype from two computers.
    Last week i blocked a contanct from computer1 and yesterday i unblocked it from the same computer.
    So i noticed that after i unblocked this contact, it still appears at my homepage with his picture, info and everything, BUT only from computer1.
    When i use computer2, this contact appears at my contacts, but only with his skype name (the one he uses to log in) and not with his display name. Also, i can't see his picture or any other information. It just appears offline, with his log-in name and with no picture. That's all.
    So what's going on? Why can i see everything normally from computer1 but not from computer2?
    P.S.1 99% he blocked me too, but i have no idea whether he unblocked me or not.
    P.S.2 I know my english is horrible, sorry for that.

  • Invoking Forms 6i application from command line with parameters

    Hi,
    I have a java application that requires to start up and execute an existing Forms 6i application.
    I am not a java person, and I could not find any help regarding this. If anyone knows how to execute an fmx(6i) from within a java application, then please let me know. The java application has to pass in parameters so that the the Forms application opens up with the correct data.
    One alternative suggested was that the java application execute a command line invocation of the Forms application. I am looking for the correct and complete syntax to do this. The fmx can be invoked from the command line with the following entered at the dos prompt -
    c:\>OraFrm6i\Bin\ifrun60.exe<module name> <userid/password@db>. This works fine and the Forms application is executed.
    The requirement is to pass a couple of user defined parameters to the Forms application which can be used by it to query the database and display the correct information when it opens.
    Any help on this would be greately appreciated.
    Thanks
    Shailesh

    Shailesh,
    Create a parameter in your form - eg. COUNTRY_CODE and add any startup code.
    Then add the parameter to your command line (or put it in a *.bat file)
    c:\>OraFrm6i\Bin\ifrun60.exe<module name> <userid/password@db> country_code=UK
    JR

  • Any tool to help checking the database is in line with the 2NF

    Is there any tool to help checking the database design is in line with the 2NF (second normal form), Thanks.

    Hi,
    Is this table in 2nd normal form?
    CREATE TABLE     orders
    (       order_id     NUMBER (10)     PRIMARY KEY
    ,     company          VARCHAR2 (10)     NOT NULL
    ,     customer     VARCHAR2 (30)
    );How can you tell?
    How would you expect some tool to tell?
    If you willing to even make a guess, it's only because you know what "order". "company" and "customer" probably mean in this context.
    There are queries other methods you could use to detect tables that might not be in second normal form. Fort example, you could assign a number (0-100) to each table, 0 meaning it seems to be in second normal form, 100 means that it has all the traits you expect from a table that is not in second normal form, and then list the 20 tables with the highest scores to check.
    Say exactly what you're trying to do, and someone will help you find a good way to do it. Post CREATE TABLE and INSERT statements for some tables, and expalin what traits you're looking for.

  • Add new line with sed

    Hello,
    I try to insert a new lines after a model line with a sed command in a script ,like :
    Before :
    ### model line#####
    After :
    ### model line#####
    new line 1
    new line 2
    I try something like this, but the newlinecharacter in not good understand :
    sed -e"s/### model line#####/### model line#####\nnew line 1\nnew line 2/g" my.cnf
    Some know how do that ??
    Thx

    to append newlines using sed, do not do it on cmd-line, because the shell will interprete the script,
    so put in 'sedcmd' something like:
    #-------begin
    /muster/a\
    linea
    lineb
    linec
    #---------end, note the last blanc line, is NEEDED!
    this also works for 'i' insert
    to change/delete blanc lines, you need to know what is a blanc line
    sed 's/^$/:/g'
    will replace blanc lines by ':'
    sed '/^$/d'
    will delete blanc lines
    finally sed has troubles w/ special characters, but it is NOT a bug!
    kind regards, jms

  • Using mac mini in line with a PC

    I was thinking of buying a mini Mac for my 83 yo mother who currently uses a PC. Knowing that she likely would not like to just get rid of her PC for an OS she's totally unfamiliar with, I thought I might get her a Mini Mac. However, space in her home is limited so I was trying to learn if there was a way that the Mini Mac could be used in a "shared" fashion with her existing PC. In other words, someway to use it without having to physically transferring her keyboard, mouse and monitor connections each time she were to use one or the other system.
    Thanks

    What you're looking for is a "kvm switch." This thing let's you share a keyboard, mouse and monitor between 2 systems. I'd checkout some site like newegg to see what people are buying to get an idea of what features to look for.
    Does your mom's pc use a "ps/2" connection (round plug) for either the mouse or keyboard? If it does you might want to get a kvm that has "ps/2" connections.
    If both the keyboard and mouse use usb plugs then I'd get a kvm with usb connections.
    I'm doing the same thing and I got a usb kvm with vga for video. I'll need to get a "mini-dvi to vga" adapter for the mac mini though. The adapter that comes with the mac mini doesn't work with a "vga to dvi" adapter. I also should have picked a kvm with audio support so I can share the speakers too.
    You can save yourself the cost of the adapter by connecting the pc to the vga port and connect the mac to the dvi port on the monitor, but that means having to press another button on the monitor to switch input modes =P
    Message was edited by: Kl l

  • Parsing and extraction of numbers from select lines in a string

    hey guys, i've been running into some issues with my code and i was wondering if you could help me out. currently what i've done is take an xml document returned from a server, put it into a string, and then select specific lines from that string, from which i will extract numbers. here's the string
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF>now my first attempt at pulling this off worked just fine, but only for the female demographics, since the tags for female and male are identical (only the numbers/data is different) and my parser would stop after reaching the first round of tags specified.
    here's part of my code for that section, located in the main (response is the xml string returned from server):
    while ((temp = in.readLine()) != null)
                 response += temp + "\n";
            temp = null;
            in.close ();
    int left = response.indexOf("<census1:under5Years rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">");
              int right = response.indexOf("</census1:under5Years>");
                   // pull out the text inside the parens
                   String parsed = response.substring(left+77, right);
                   double parseddub = Double.parseDouble(parsed);
                        //divide the group Under5Years into Under12Mo and 1to4Yr
                        double Group1Adub = parseddub*.25;//25% for Under12Mo
                        Group1Adub = Math.ceil(Group1Adub);
                        int Group1A =(int)Group1Adub;
                        double Group1Bdub = parseddub*.75;//75% for 1to4Yr
                        Group1Bdub = Math.ceil(Group1Bdub);
                        int Group1B =(int)Group1Bdub;
    //..need to basically duplicate this for 3 other age groups
    int Group1 = Group1A;
    System.out.println("Server response:\n" + "Female");
              System.out.println("Under 12 Months:    " + Group1);now basically, everything works great for the female data, but i would like to somehow loop this or selectively parse by line and then extract information from those selected lines. any thoughts? i would really appreciate some insight thanks.

    lol no offense taken. sorry for the confusion, please disregard my earlier statements... :)
    i actually was able to get the thing working, i just didn't quite understand what i was doing at first.
    however, i noticed that the regex only handles the first four lines of each group (male and female). i was wondering if there was a way to do it that's non-sequential?
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF> using the regular expression, i can parse the string, but what i really need is to only parse the 8 lines designated, and they are not in sequential order, which makes it somewhat problematic.
    the format of the output i want to get should be as in the following example (female: under5, 5to9, 10to14, 15to17):
    [864, 949, 875, 534]
    same format for male of course. i'm just not sure how to edit the regex so that it can select only the lines i'm concerned with...? thanks so much i really appreciate this.

  • Help extracting URL's from PDFs I create

    Using Acrobat pro 9.+ I have several PDF catalogs I have created, and what I need t
    o do is extract the URL's for each 100 page catalog.
    These are added URL's using the Acrobat linking tool
    Ideally they would be one URL per row, and have at least a minimum amout of information.
    1. URL
    2. (if possible, the page the URL is from)
    Thank you

    maybea two step process? one applescript that extracts to a text file, and then an automator that can read that file (can autoamtor read froma  text file?) and do what you want?
    Jason

  • 6 Disc Series, need to use bits from Disc 1 on Disc 5, but only as a 'special feature'...

    Ok,  so now I'll try to explain it with a few more words than the title allowed for
    I'm working on a DVD series, there will be 6 discs in all,   5 are closely related (Remedial Massage Therapy - Training Course)
    Some relevant info:     Each disc is a separate Premiere Project.
    There are some techniques demonstrated on say Disc 2 which are relevant to something being treated on Disc 5..    Now it’s not really the best case scenario to keep repeating said thing on Disc two (which is one way to do what I’m asking I guess).
    If you watch Disc 5 right through, it’s fine – it all makes sense, BUT we’d like to be able to put together a ‘Special Features’ playlist so that people can watch for example: Everything to do with treating the Shoulder.     (There are some shoulder things demonstrated on Disc 2, Disc 4 and Disc 5)
    Is there a way to do this?        I’ve only ever used one edited video on one timeline at a time in Encore so I’m not really sure what it can do..     
    If anyone is able to help me out with an answer that’d be greatly appreciated.. Sorry if my question isn’t making a whole lot of sense – I’ve tried haha, been a LONG day editing.. .
    Cheers,
    Rory O'Donnell

    You can also use a playlist, and chapter playlist, to play all the special feature parts. For example, let's say you have a timeline for the video from disk 2, a timeline for the part from disk 4, and you have your timeline for disk 5.
    I assume from what you have said that you have one timeline on disk 5, and that you want to play only one - or two or three - sections from that timeline. The following assumes that you will have them marked as chapters - which you can do in Encore.
    You make a Chapter Playlist for the disk 5 timeline, including only the one chapter you want, or include more. Then you make a Playlist (not a chapter playlist), and include the Chapter Playlist you just make, and the timeline of material from Disk 2 and 4. Your special features menu can play all by pointing to the Playlist, or each disks material separately.

  • Level0 Extract using MaxL from Multicurrency Planning application

    I have a multi currency Planning application with 2 Dense and 6 SParse dimension.
    Account And Currency Dense
    Rest all Sparse
    when i am running the level0 export using a maxL scrit to get data in Column format, it is generating all memebr in Column except Currency which is going to header
    and data in getting displayed in 3 separate culumn
    local CAD USD
    D1 D2 D3 D4 D5 200 #MI #MI
    how can get the data in one column and want currency dimension also dispaly in a column as other dimension.. any thought..
    -KK

    If it is a standard level0 export you cannot change the format of the extract.
    You could have a look into to using the DATAEXPORT command :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/dataexport.htm
    It may be worth having a look at :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_dbag/drpexpo.htm#drpexpo1020295
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Running report from command line with multiple value for same parameter

    Hey,
    I know how to run a report from the command line specifying parameters values each time but I was wondering if someone could tell me how I would go about running the same report multiple times in a batch program but specifying a list of values to pass to a parameter each time.
    So for example if a parameter was 'School Number', how could I run a report in a batch program that would pass a school number to the report as a parameter using a list of school numbers generated for a sql statement or something. So if I had 300 school numbers in my list then I would get 300 different reports when the batch program finished.
    This leads me to another question. How can I dynamically change the name of the report generated by the batch to use the school number value passed in, so for example if the value 3 was passed in the name would be something like School 3.pdf, if 4 was passed in the name would be School 4.pdf....etc
    Any help on this?
    Thanks

    Hello,
    Bursting and Distribution may help you ....
    37 Bursting and Distributing a Report
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_dist.htm
    Regards

  • Startup and shutdown from command line with version 9i

    Hi, i'm an Oracle newbie. I heard it's possible to startup and shutdown an oracle (instance? or database? which one is it) from the command line.
    A little background on what it is that I want to do:
    I'm looking to backup a database by copying the files that make up the database to a location from where they will be commited to tape media. To do this I must shutdown the database, copy the files, and startup the database again.
    At the moment the backups are full exports which I find unnecessary since it is a development database which is never used at night. It is therefore not an issue if we want to shut it down and re-start it after a few minutes. (I think it would take longer to export as opposed to copy the files right?)
    I need help and advice :
    1. Is my way of going about this correct ?
    2. How do I startup/shutdown from the command line (sqlplus user/password command) or should I use another utility ?
    Thanks,
    Gabriel

    set oracle_sid=ORCL ==> your database namethis is NOT always true. It's instance name. usually, we set instance name is same as database name.But we also can set instance name is different from database name.
    for example.
    C:\>oradim -new -sid abc123
    C:\>set ORACLE_SID=abc123
    C:\>sqlplus /nolog
    SQL*Plus: Release 9.0.1.4.0 - Production on Tue Jun 20 22:40:59 2006
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    SQL> conn / as sysdba
    Connected to an idle instance.
    SQL> startup pfile=E:\ora901DB\admin\init.ora
    ORACLE instance started.
    Total System Global Area  344748244 bytes
    Fixed Size                   282836 bytes
    Variable Size             184549376 bytes
    Database Buffers          159383552 bytes
    Redo Buffers                 532480 bytes
    Database mounted.
    Database opened.
    SQL> select name from v$database;
    NAME
    DB901
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    abc123

Maybe you are looking for