A real task..( to search and display few lines from a log file)

have a look at the following link
http://computing.unn.ac.uk/staff/cgpb2/public_html/log.html
i need to display to the users only the Hourly Transmission Statistics (Bytes Sent Requests Time) on a tabular format from the above mentioned link.
t
his is not easy
can any one write down the code please..
thank you very much.

What have you done so far?
What kind of approach are you going to take (aside from asking others to do it all for you)?
Have you written the algorithm in psuedo-code? If so, can we see it? We might be able to give you a few pointers.

Similar Messages

  • How to select and read #define lines from a code file

    Hi,
    I would like to read a .m file
    and select the lines which begins with '#define PL-KEY', like
    {quote}
    #define PL-KEYTAG TAG_values
    #define PL-KEYGROUP GROUP_value
    #define PL-KEYINFO "INFO_ValueTxtMax120Char" // could be max 120 char
    ..... more PL-KEY keys
    {quote}
    and put the rest of that line until a '//' or '/*' , like
    {quote}
    TAG TAG_values
    GROUP GROUP_value
    INFO "INFO_ValueTxtMax120Char"
    {quote}
    into something like a list where my code above will loop through.
    I thought using something like
    cat "path/to/code.h" | while read line
    do
    #... what do I have to with "$line" ...
    if [[ "$line" == #define PL-KEY* ]] ; then
    # yes then... then what????
    done
    any suggestions?? I noticed today, I am still no shell expert
    Thanks again

    I can't help much with PlistBuddy, as I just recently found out about it myself.
    But for the code, here are some adjustments based on your comments.
    I stuck with shell scripting because you seem to be more comfortable with shell scripting, vs awk or perl.
    #!/usr/bin/env bash
    while read lb_def rest
    do
    if [[ "$lb_def" = #define && "$rest" = PL_KEY* ]]; then
    rest=${rest#PL_KEY}
    echo "${rest%/[/]}"
    fi
    if [[ "$lb_def" = # && "$rest" = define PL_KEY* ]]; then
    rest=${rest#define }
    rest=${rest#PL_KEY}
    echo "${rest%/[/]}"
    fi
    done </path/to/code.h
    If PL_KEY has stuff in front if it, like one of your posts where it was kPL_KEY, then you could modify the uses of PL_KEY to include the 'k', or you could wildcard it. If a single character, then
    if [[ "$lb_def" = #define && "$rest" = ?PL_KEY* ]]; then
    rest=${rest#?PL_KEY}
    If multiple characters could prefix PL_KEY, then you can use the multi-character wildcard
    if [[ "$lb_def" = #define && "$rest" = PL_KEY ]]; then
    rest=${rest#*PL_KEY}
    If you are worried, that PL_KEY might exist in the comment, then you could strip the comment before doing the tests
    #!/usr/bin/env bash
    while read lb_def rest
    do
    rest=${rest%/[/]} # remove comments.
    if [[ "$lb_def" = #define && "$rest" = PL_KEY ]]; then
    rest=${rest#*PL_KEY}
    echo "${rest}"
    fi
    if [[ "$lb_def" = # && "$rest" = define PL_KEY ]]; then
    rest=${rest#define }
    rest=${rest#*PL_KEY}
    echo "${rest}"
    fi
    done </path/to/code.h
    Is that better?
    Message was edited by: BobHarris

  • Search result to get data from bing search and display it in sharepoint page.

    I have configured result source which gets data from bing site,i have given following url as source url
    http://www.bing.com/search?q={?searchterms}&format=rss&Market=en-Us
    but it returns only 8 results from RSS. i want to get all results of search and display it in my SharePoint search results page. 
    any pointers will be helpful. 

    Hi,
    According to your post, my understanding is that you wanted to search result to get data from bing search and displayed it in sharepoint page.
    To display more items, you can modify the item number when you add
    New Query Rule.
    To get all results, I recommend to use the “Show More”
    link in the result page.
    You can enter the URL when you add New Query Rule:
    "More" link goes to the following URL: http://www.bing.com/search?q={searchterms}
    Here is a great blog for your reference:
    http://sharepoint-community.net/profiles/blogs/integrate-bing-with-sharepoint-online-2013-search
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

    How do you read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine?
    I tried using a DAQ Assistant but the CAN port is not included as one of the supported physical channels even though all its drivers are upto date.
    Please help..
    Thanks.
    Solved!
    Go to Solution.

    Attached herewith is a print screen of what is showing on MAX
    The CAN ports are on NI PXI-8461
    Hopefully that clarrifies something.
    Attachments:
    Untitled.png ‏212 KB
    Untitled.png ‏212 KB

  • How to read and display a signal from my PIC Microcontr​oller onto Labview?

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/007​74a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    It is a good idea to first be able to communicate with the microcontroller using some sort of serial communication software such as "HyperTerminal" or "Procomm", etc. Refer to MicroChip's recommendations on this.
    Once that works, then you are ready to use LabView.
    Here is a link which covers many aspects of serial communication. Link - click here
    You probably received a development kit. They usually have a readily available interface. It's been a long time since I played with the PIC, but I seem to remember that you need to program the serial communication driver (as well as at least a bootloader) to get the serial communication going. The driver contains the necessary protocols so that you PC can have a machine conversation with the target (PIC).
    It sounds like a fun & interesting project. Please avoid to have replies to your personal email. By having the answers posted to this thread, you will get much more support and advice.
    Have fun,
    JLV

  • How to read and display a signal from my PIC Microcontroller onto Labview

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/00774a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    I am not familiar with the PIC Microcontrollers, but I am assuming you mean that you have the microcontroller sending out serial data that you want to read on another computer with LabVIEW. Please let me know if this is incorrect.
    What type of data is coming out of the serial port? Is it ASCII, or binary? The reason I ask this is that the serial communication in LabVIEW is done through a protocol called VISA, which uses ASCII data to send and receive. You can later convert this data into whatever form you need, but this is what it is designed to read and write.
    You can check the settings such as baud rate and data bits in a configuration utility called Measurement and Automation Explorer, or MAX. When you open up the MAX interface, you can expand the Devices and Interfaces entry on the left, and then expand the Ports entry to see your serial port. When you highlight this port, select the Port Settings tab at the bottom of the window, and you can see what the current settings are, and change them if you need to. You can also set these parameters in LabVIEW using the VISA Configure Serial Port VI.
    You can also test communication in MAX by right clicking on the correct port and choosing Open VISA Session. Then choose the Basic I/O light blue tab, and then go to the Read tab. When you click execute, it should read in what is coming from the serial port. This will allow you to verify that the correct information is coming in before even trying to acquire the data in the LabVIEW environment.
    In LabVIEW, the best resource to use the Basic Serial Write and Read example program that ships with LabVIEW. By examining the block diagram of this program, you will be able to see the basic programming flow of serial communication in LabVIEW.
    I hope this information was helpful! Please let us know if there's anything else we can help with.
    john
    Applications Engineer

  • How to search and delete an email from the mailbox

    hi,
    have a hybrid scenario, exchange 2013 and office 365
    what command should I use to search and delete an email from the organization mailbox i.e. I do not want that email to be in any users inbox.
    I have tried this command but it does not work, it says search-mailbox is not recognized as the name of the command let.
    Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:"Download this file"' -DeleteContent
    kindly assist.
    Kind Regards, Khuzema R.

    Hi Khuzema
    This can be accomplished by search-mailbox command
    First you need to create a new role group
    To Create –  New-RoleGroup “Mailbox Import-Export Management” -Roles “Mailbox Import Export”
    Then add the user to the group
    To Add user – Add-RoleGroupMember “Mailbox Import-Export Management” -Member Administrator
    Search the mailbox
    get-mailbox -ResultSize unlimited -IgnoreDefaultScope | search-mailbox -SearchQuery ‘Subject:”virus infected”’ -LogOnly -TargetMailbox administrator -TargetFolder filter -LogLevel Full
    Now we need to run the below command to search the infected emails and delete all of them in the whole organization
    get-mailbox -ResultSize unlimited -IgnoreDefaultScope | search-mailbox -SearchQuery ‘Subject:”virus infected”’ -TargetMailbox administrator -TargetFolder filter -deletecontent -LogLevel Full
    Also you can do a message tracking with the subject and delete them
    Get-ExchangeServer | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-MessageTrackingLog -Messagesubject “Virus Infected” | Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Recipients
    | Sort-Object -Property Timestamp
    I have written a blog with regards to the same. You can always refer this which might mostly  help you in your scenario
    http://exchangequery.com/2014/10/16/steps-to-delete-circulated-suspicious-emails-with-search-mailbox/
    Thanks 
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • How do I copy a few lines from a pdf document to a Word document?  I'm not looking to convert the whole document, just need to copy a few lines here and there.

    How do I copy a few lines from a pdf document to a Word document?
    I'm not looking to convert the whole document, just need to copy a few lines here and there.
    ps.  Wow, what a user UNFRIENDLY site this is!

    In most cases you can just select the text and copy/paste. You can do that unless the file is a picture/scan.

  • Help on Reading and Reporting From A log File

    Hi there
    I need any assistance on developing a class that is able to read from a log file and then be filtered and put into a report. I need to be able to search on the log files per criteria.

    Chainsaw:
    http://logging.apache.org/log4j/docs/chainsaw.html

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there,
    Could anyone please let me know how to load few columns from a .csv
    file into a oracle table using SQL*Loader.
    I know how to create a .dat and .ctl file and run the sql loader.
    Suppose I have a .csv file with
    col1, col2, col3, col4
    and I only need to load col1 and col3 into col_a and col_b respectively
    in table_a?
    structure of table_ a
    col_a,
    col_b
    Please advice

    Try like..it i will work..
    LOAD DATA
    INFILE 'test.txt'
    LOAD DATA
    TRUNCATE INTO TABLE T1
    FIELDS TERMINATED BY ','
    (col1,
    col2 FILLER,
    col3,
    col4 FILLER
    )

  • How to display Japanese text from an XML file

    Hiya,
    I have various adapted mp3 players [called playlists on my site] which retrieve the songs and song titles/artists from an XML file. One of them plays Japanese music.
    Most of the tracks are in English but I now have a couple of songs with Japanese titles and file names which I can't get to preview/display in Flash Pro CS5 [Mac]. I can type static Japanese text and it displays fine but Flash seems to be having a problem with the Japanese from the XML file.
    Though I can find the English titles, etc, it would be nice if there were a way to display Japanese text from a 'multi-lingual' [English and Japanese] XML file [probably something really easy].
    Thanks a bunch.
    steve

    This should help you:
    http://http://www.packtpub.com/article/working-with-xml-in-flex3-and-java-1http://www.packtpub.com/article/working-with-xml-in-flex3-and-java-1

  • TRYING TO INSTALL adobe photoshop elements8 AND IM GETTING error opening installation log file. verify that the specified location exists and is writable

    TRYING TO INSTALL adobe photoshop elements8 AND IM GETTING error opening installation log file. verify that the specified location exists and is writable

    Error opening installation log file | Windows

  • Can i search and replace in the itunes library database file?

    Hi --
    I need to update the file location in the itunes database for a few thousand songs. These songs are just part of my full collection. A few hundred of these songs are referenced in playlists. Rebuilding the libarary, consolidating the library, adding the new folder to library -- none of these suggested solutions to similar problems will work for me. (My collection is too large for one drive and is spread over several drives, and I have many playlists with hundreds of songs, and the playlists would be ruined with any of these approaches.)
    I thought I had an easy solution by doing a search and replace in "itunes library.xml," replacing the old file path with the new one. But then I learned (as you probably already know) that the real information is stored in "itunes library," and the xml file is just a downstream copy of that information. All my edits were overwritten as soon as I opened itunes.
    The solution to my problem is completely straight-forward if I can just do a search and replace in "itunes libray." Is it possible to edit that file directly? The only database program I have is MS Access, on windows, and it couldn't open the file.
    Thanks very much
    - Mark

    How to Move Your Music to a New Computer.

  • Search and remove subscribers manually from BC

    I am wanting to remove several subscribers from multiple email lists.
    Is this possible without having to scroll through countless pages from a variety of lists?
    We often get around a dozen people who mail in and say 'remove me from your list' as opposed to managing their account.
    In order to remove them I have to do the following.
    Choose the first email list of many
    change drop down display to 50 address
    click address column to sort into alphabetical order
    scroll through until I find the place where the email would be
    if there, delete
    if not there, assume its on a different list or they did actually unsubscribe as well as send the email to unsubscribe
    With tens of thousands of email addresses and multiple lists, this takes a long time.
    Is there a way to simply enter a search, then delete?
    The only way I could see at the moment is to export, excel search and delete then re-import. Don't really want to be doing that though.
    Many thanks

    Hi,
    In Admin, go to CRM > Search and lookup the user's e-mail address. Any user subscribing to a mailing list is turned into a CRM Customer. Once you find the contact, open it and go to "Subscriptions" and untick the respective list (all subscriptions will be listed on top, under "Campaign List")
    Kind Regards,
    Alex

  • To display few lines of texts in a paragraph in bold in chinese

    Hi,
    I have a requirement to display smartform output in English and Chinese.In a paragraph few lines have to be displayed in bold in chinese.
    I have created a standard text in chinese languge to diplay this text.In the standard text,few lines have to displayed in bold.How to achieve this?

    Dear Hema,
    To me, I think you create a text node to put your chinese in it and create a character node in smartstyles for bold some paragraph.
    please check
    regards,

Maybe you are looking for

  • A basic question of class

    Hello guys, i'm new hand and i got this question but i'm not sur of the answer, any help would be welcome :) The correct statement(s) are: a: a class is an instance factory b: a class is a template for creating an entity c: a class is a set of all th

  • Retriving of data

    how to retrive data lost while updation the i phone Please help special contacts

  • BOE XI 3.1 SP3

    Hi SDNs Can any body let me know When is BOE XI 3.1 SP3 will be available. I went through all over service.sap.com. But could not find the avaialbale date. I read it is going to be released in Q1 2010. But I am looking for exact date.

  • Relation between a datafile and segments.

    Hi All, I am trying to understand the storage concepts of oracle. I read that 1. Tablespace is a logical grouping of datafiles 2. Segments are made up of Extents and Extents are composed to DB Blocks which are logical grouping of OS blocks. But I am

  • I cannot load my old Photoshop CS Ver.8 on my new Win 7 OS without it telling me it's a trial disc.

    I am trying to install an old Photoshop CS Ver.8 on my new Windows 7 Home Premium OS but it tells me it's a trial Version??  It installs perfectly and works fine but informs me it is good for only 29 more days??  I bought this program new years ago.