Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to extract info from text file between the tags Post 302694887 by Corona688 on Friday 31st of August 2012 01:46:20 PM
Old 08-31-2012
Details, please! In what way are they "not working"?

What, exactly, did you do? Show us word for word, letter for letter, keystroke for keystroke.

Does my script to transform the data into XML work at least?

Post more complete output, I suspect your data doesn't always look like what you said.
 

10 More Discussions You Might Find Interesting

1. AIX

Extract info

Anyone have a better idea to automate extraction of info like ... "uname" "ifconfig" "ps efl" "netstat -ao" etc. from several hundred aix, solaris, red hat boxes? without logging into each box and manually performing these tasks and dumping them to individual files? thanks for any input (1 Reply)
Discussion started by: chm0dvii
1 Replies

2. UNIX and Linux Applications

Parsing info from a text file into an IDL procedure

Hi, I hope this is appropriate for this forum. I have a text file (test.txt) that contains information that I would like to parse into an IDL procedure. Each line of the text file is either a number or a string, which will be a variable in my IDL procedure. Therefore I want to read each line... (1 Reply)
Discussion started by: msb65
1 Replies

3. Programming

c program to extract text between two delimiters from some text file

needa c program to extract text between two delimiters from some text file. and then storing them in to diffrent variables ? text file like 0: abc.txt ========= aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
Discussion started by: kukretiabhi13
7 Replies

4. Shell Programming and Scripting

how to extract info from a file using awk

Dear all I have a file call interfaces.txt Filename: interfaces.txt How can I extract the information at below? ABC_DB_001 hostname1 20901 ABC_DB_002 hostname2 20903 ABC_DB_003 hostname3 20905 Currently I am using a very stupid method grep ^ABC interfaces.txt > name.txt grep... (3 Replies)
Discussion started by: on9west
3 Replies

5. Shell Programming and Scripting

Extract info from log file and compute using time date stamp

Looking for a shell script or a simple perl script . I am new to scripting and not very good at it . I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report. ... (0 Replies)
Discussion started by: breez_drew
0 Replies

6. Shell Programming and Scripting

Using AWK BEGIN to extract file header info into variables

Hi Folks, I've searched for this for quite a while, but can't find any solution - hope someone can help. I have various files with standard headers. eg. <HEADER> IP: 1.2.3.4 Username: Joe Time: 12:00:00 Date: 23/05/2010 </HEADER> This is a test and this part can be any size... (6 Replies)
Discussion started by: damoske
6 Replies

7. Shell Programming and Scripting

how to extract the info in the tag from a xml file

Hi All, Do anyone of you have any idea how to extract each<info> tag to each different file. I have 1000 raw files, which come in every 15 mins.( I am using bash) I have tried my script as below, but it took hours to finish, which is inefficiency. perl -n -e '/^<info>/ and open FH,">file".$n++;... (2 Replies)
Discussion started by: natalie23
2 Replies

8. Shell Programming and Scripting

How to extract the day of the year and use that info to copy a file remotely

Hello, Thank you in advance for helping a newbie who is having great trouble with this simple task. I'm allowed to copy one file remotely each night due to bandwidth restrictions. A new file gets generated once a day, and I need to copy the previous day's file. Here is what I'd like to do:... (1 Reply)
Discussion started by: tmozdzen
1 Replies

9. Shell Programming and Scripting

HELP: Shell Script to read a Log file line by line and extract Info based on KEYWORDS matching

I have a LOG file which looks like this Import started at: Mon Jul 23 02:13:01 EDT 2012 Initialization completed in 2.146 seconds. -------------------------------------------------------------------------------- -- Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies

10. Shell Programming and Scripting

How to extract info from pings.?

Hi guys, new to this forum. I am currently trying to extract the times from pinging a domain and list the top 3 and then also do the opposite i.e. list the bottom 3. so if I had this as a ping result (the bold part is what I want): 64 bytes from 193.120.166.90: icmp_seq=10 ttl=128 time=34.8... (5 Replies)
Discussion started by: acoding
5 Replies
cdk_traverse(3) 					     Library Functions Manual						   cdk_traverse(3)

NAME
cdk_traverse - functions to support keyboard traversal SYNOPSIS
cc [ flag ... ] file ... -lcdk [ library ... ] #include <cdk.h> CDKOBJS *getCDKFocusCurrent (CDKSCREEN *screen); CDKOBJS *setCDKFocusCurrent (CDKSCREEN *screen, CDKOBJS *obj); CDKOBJS *setCDKFocusFirst (CDKSCREEN *screen); CDKOBJS *setCDKFocusLast (CDKSCREEN *screen); CDKOBJS *setCDKFocusNext (CDKSCREEN *screen); CDKOBJS *setCDKFocusPrevious (CDKSCREEN *screen); int traverseCDKScreen (CDKSCREEN *screen); void exitOKCDKScreen (CDKSCREEN *screen); void exitCancelCDKScreen (CDKSCREEN *screen); void resetCDKScreen (CDKSCREEN *screen); void exitOKCDKScreenOf(CDKOBJS *obj); void exitCancelCDKScreenOf (CDKOBJS *obj); void resetCDKScreenOf (CDKOBJS *obj); void traverseCDKOnce ( CDKSCREEN *screen, CDKOBJS *curobj, int keyCode, boolean functionKey, CHECK_KEYCODE funcMenuKey); DESCRIPTION
The functions above handle the traversal of a screen populated with various widgets. Once the screen has been created and populated with widgets, a single call to traverseCDKScreen() will allow the user to move between widgets and enter data (or otherwise manipulate widgets). Other functions are provided for use as callbacks by the widgets on the screen. Finally, there are several functions which allow the call- er to manipulate the state of the traversal, i.e., the object which has focus. In order for widgets to be used on a screen which is to be handled by traverseCDKScreen(), it must have the following methods available: injectCharObj inputWindowObj focusObj unfocusObj saveDataObj refreshDataObj In addition, the following object properties must be properly handled: acceptsFocus hasFocus inputWindow dataPtr dataType At the time of this writing, not all widgets have been modified to work with the screen-traversal facility. AVAILABLE FUNCTIONS
int traverseCDKScreen (CDKSCREEN *screen); This function contains the main screen traversal engine. It does the following: 1. Calls the refreshData method on each of the widgets to tell them to update their appearance to match the data which are referenced by their respective data pointers. 2. Calls the focusObject method on the first widget. 3. Repeats the following until one of the exit functions listed above has been called: * Read a keystroke from the keyboard. * If the keystroke is ESCAPE and a menu widget is present, activate the menu and traverse it until the user selects an entry or hits TAB. * If the keystroke is TAB/BACKTAB then call the unfocusObject method on the current widget, and move focus to the next/previous widget (not counting menu widgets). Call the focusObject method on the newly current widget. * If the keystroke is the EXIT-SAVE keystroke, then call the saveData method on each widget and return 1. * If the keystroke is the EXIT-CANCEL keystroke, return 0 without saving changes made by the user. * If the keystroke is the RESET-DATA keystroke, then call the refreshData method on each of the widgets to reset their appearance to match the data values that were present upon entry. * Otherwise, pass the keystroke to the current widget. CDKOBJS *getCDKFocusCurrent (CDKSCREEN *screen); Return a pointer to the object which currently has focus in the given screen. CDKOBJS *setCDKFocusCurrent (CDKSCREEN *screen, CDKOBJS *obj); Set the focus to the given object, if the screen contains that object. If the screen does not contain the object, return null. Oth- erwise, return the object. CDKOBJS *setCDKFocusFirst (CDKSCREEN *screen); Set focus on the first object in the given screen. CDKOBJS *setCDKFocusLast (CDKSCREEN *screen); Set focus on the last object in the given screen. CDKOBJS *setCDKFocusNext (CDKSCREEN *screen); Set focus on the next object in the given screen. CDKOBJS *setCDKFocusPrevious (CDKSCREEN *screen); Set focus on the previous object in the given screen. exitOKCDKScreen Causes the traversal engine to exit after calling the saveData method for each of the widgets. exitOKCDKScreenOf Calls exitOKCDKScreen() on the screen associated with widget obj. This function was designed to be used as a callback routine for a button widget used as an OK button on a data-entry screen. exitCancelCDKScreen Causes the traversal engine to exit without saving user modified data. exitCancelCDKScreenOf Calls exitCancelCDKScreen() on the screen associated with widget obj. This function was designed to be used as a callback routine for a button widget used as a Cancel button on a data-entry screen. resetCDKScreen Causes the traversal engine to call the refreshData method for each widget. This will cause any unsaved changes to be discarded and the widget states will be restored to their initial values. resetCDKScreenOf Calls resetCDKScreen() on the screen associated with widget obj. This function was designed to be used as a callback routine for a but- ton widget used as a Reset button on a data-entry screen. traverseCDKOnce This is a utility function, one of the pieces from which you can construct a customized version of traverseCDKScreen. BUGS
Not all widgets have had the extra methods added so that they work with the screen traversal engine. AUTHOR
Grant Edwards, Aspen Research Corporation Thomas Dickey and contributors. SEE ALSO
cdk(3), cdk_binding(3), cdk_display(3), cdk_screen(3) cdk_traverse(3)
All times are GMT -4. The time now is 04:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy