Sponsored Content
Top Forums Shell Programming and Scripting Extract data into file with specific field specs Post 302357035 by methyl on Monday 28th of September 2009 01:00:50 PM
Old 09-28-2009
Please state your Operating System, preferred unix shell, and provide a sample of the input data (making any field delimiters emphatically clear), and a clear matching sample of the the required output data.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract specific data from xml format file.

Hi, I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need. . .... (7 Replies)
Discussion started by: 60doses
7 Replies

2. HP-UX

extract field of characters after a specific pattern - using UNIX shell script

Hello, Below is my input file's content ( in HP-UX platform ): ABCD120672-B21 1 ABCD142257-002 1 ABCD142257-003 1 ABCD142257-006 1 From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could... (2 Replies)
Discussion started by: jansat
2 Replies

3. Shell Programming and Scripting

Extract data from log file from or after the specific date

Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d %H:%M:%S". So, in the script, before I start the process, I am storing the date as DATE=`date +"%Y... (5 Replies)
Discussion started by: chiru_h
5 Replies

4. Shell Programming and Scripting

Extract all the content after a specific data

My input: >seq_1 DSASSTRRARRRRTPRTPSLRSRRSDVTCS >seq_3 RMRLRRWRKSCSERS*RRSN >seq_8 RTTGLSERPRLPTTASRSISSRWTR >seq_10 NELPLEKGSLDSISIE >seq_9 PNQGDAREPQAHLPRRQGPRDRPLQAYA+ QVQHRRHDHSRTQH*LCRRRQREDCDRLHR >seq_4 DRGKGQAGCRRPQEGEALVRRCS>seq_6 FA*GLAAQDGEA*SGRG My output: Extract all... (22 Replies)
Discussion started by: patrick87
22 Replies

5. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

6. Shell Programming and Scripting

How to extract specific data and count number containing sets from a file?

Hello everybody! I am quit new here and hope you can help me. Using an awk script I am trying to extract data from several files. The structure of the input files is as follows: TimeStep parameter1 parameter2 parameter3 parameter4 e.g. 1 X Y Z L 1 D H Z I 1 H Y E W 2 D H G F 2 R... (2 Replies)
Discussion started by: Daniel8472
2 Replies

7. Shell Programming and Scripting

extract data in a csv file based on a certain field.

I have a csv file that I need to extract some data from depending on another field after reading info from another text file. The text file would say have 592560 in it. The csv file may have some data like so Field 1 Field2 Field3 Field4 Field5 Field6 20009756 1 ... (9 Replies)
Discussion started by: GroveTuckey
9 Replies

8. Shell Programming and Scripting

How to extract specific data?

Bash scripting beginner here... I have many folders, each folder representing one subject. Not all subjects have all the required files, so I need to somehow cycle through all the data and then extract the data only from subjects who have no files missing. I tried to output the ls command, but... (4 Replies)
Discussion started by: LeftoverStew
4 Replies

9. Shell Programming and Scripting

Extract Specific Information from a particular field

Hi, I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference. My file contains information below ... (4 Replies)
Discussion started by: rramkrishnas
4 Replies

10. Shell Programming and Scripting

How-To Extract specific data from a file.

data.txt has several information like the below.. <SERVER>:WEB:MYDOM01:/tmp/cong/MYDOM01,/tmp/app/MYDOM01 <WEBER>:CANES:https-web01,https-web02:/web/apps/https-web01/config <SERVER>:WEB:MYDOM07:/tmp/cong/MYDOM07,/tmp/app/MYDOM07... (7 Replies)
Discussion started by: mohtashims
7 Replies
sample(1)						    BSD General Commands Manual 						 sample(1)

NAME
sample -- Profile a process during a time interval SYNOPSIS
sample pid | partial-executable-name [duration [samplingInterval]] [-wait] [-mayDie] [-fullPaths] [-e] [-file filename] DESCRIPTION
sample is a command-line tool for gathering data about the running behavior of a process. It suspends the process at specified intervals (by default, every 1 millisecond), records the call stacks of all threads in the process at that time, then resumes the process. The analysis done by sample is called ``sampling'' because it only checks the state of the program at the sampling points. The analysis may miss execu- tion of some functions that are not executing during one of the samples, but sample still provides useful data about commonly executing func- tions. At the end of the sampling duration, sample produces a report showing which functions were executing during the sampling. The data is con- densed into a call tree, showing the functions seen on the stack and how they were called. (This tree is a subset of the actual call tree for the execution, since some functions may not have been executing during any of the sampling events.) The tree is displayed textually, with called functions indented one level to the right of the callee. In the call tree, if a function calls more than one function then a vertical line is printed to visually connect those separate children functions, making it easier to see which functions are at the same level. The characters used to draw those lines, such as + | : ! are arbi- trary and have no specific meaning. ARGUMENTS
The user of sample specifies a target process (either by process id, or by name), the duration of the sampling run (in seconds), and a sam- pling rate (in milliseconds). If the sampling duration is not specified, a default of 10 seconds is used. Longer sampling durations provide better data by collecting more samples, but could also be confusing if the target process performs many different types of operations during that period. The default sampling rate is 1 millisecond. Fast sampling rates provide more samples and a better chance to capture all the functions that are executing. -wait tells sample to wait for the process specified (usually as a partial name or hint) to exist, then start sampling that process. This option allows you to sample from an application's launch. -mayDie tells sample to immediately grab the location of symbols from the application, on the assumption that the application may exit or crash at any point during the sampling. This ensures that sample can give information about the call stacks even if the process no longer exists. -fullPaths tells sample to show the full path to the source code (rather than just the file name) for any symbol in a binary image for which debug information is available. The full path was the path to the source code when the binary image was built. -e tells sample to open the output in TextEdit automatically when sampling completes. -file filename tells sample the full path to where the output should be written. If this flag is not specified, results are written to a file in /tmp called <application name>_<date>_<time>.<XXXX>.sample.txt, where each 'X' is replaced by a random alphanumeric character. If neither the -e nor -file flags are given, the output gets written to stdout as well as saved to the file in /tmp. SEE ALSO
filtercalltree(1), spindump(8) The Xcode developer tools also include Instruments, a graphical application that can give information similar to that provided by sample. The Time Profiler instrument graphically displays dynamic, real-time CPU sampling information. BSD
Mar. 16, 2013 BSD
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy