Hi All,
I need to select only those records having a non zero record in the first column of a comma delimited file.
Suppose my input file is having data like:
"0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005"
"0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
I'll try explain this as best I can. Let me know if it is not clear.
I have large text files that contain data as such:
143593502 09-08-20 09:02:13 xxxxxxxxxxx xxxxxxxxxxx 09-08-20 09:02:11 N line 1 test
line 2 test
line 3 test
143593503 09-08-20 09:02:13... (3 Replies)
Hi all!
A bit of background: I am trying to create a script that formats SQL statements. I have gotten so far as to add new lines based on certain match criteria like commas, keywords etc. In the process, I end up adding newlines where I don't want.
For example: substr(colName, 1, 10)... (3 Replies)
Hello,
Need help with following scenario.
A file contains following text:
{beginning of file}
New: This is a new record and it is not
on same line. Since I have lost touch with script
take this challenge and bring all this in one line.
New: Hello losttouch. You seem to be struggling... (4 Replies)
Hi,
I would like to know how can I select lines of one file based on a common ID column from another file (keeping the order of the second file).
Example of file1:
ID A B C D
1-30 1 2 3
5-60 4 5 6
1-20 7 8 9
Example of file2:
ID chr pos
1-20 1 20
1-30 1 30
5-60 5 60
Desired... (2 Replies)
I have a file.....
xxx 2345 455
abc 345 555
cdf 456 777
fff 555 888
Now my requirement is, Say if, i want to select only those records prior to the record fff 555 888...
how do i go about doing this in unix....
The fff would be hardcoded as it wud be fixed and everytime when i... (7 Replies)
Hello,
I use UBUNTU 12.04.
I want to write a short program using awk to select some lines in a file based on a second file.
My first file has this format with about 400,000 lines and 47 fields:
SNP1 1 12.1
SNP2 1 13.2
SNP3 1 45.2
SNP4 1 23.4
My second file has this format:
SNP2
SNP3... (1 Reply)
Hi All,
I have following input file. I wish to retain those lines which match multiple search criteria. The search criteria is stored in a variable seperated from each other by comma(,).
SEARCH_CRITERIA = "REJECT, DUPLICATE"
Input File:
ERROR,MYFILE_20130214_11387,9,37.75... (3 Replies)
Hello,
I have two files of the following form. I would like to remove from File.A where the first three colum matches values in File.B to give the output in File.C
File.A
121 54321 PQR CAT
122 765431 ABC DOG
124 98765 ZXY TIGER
125 86432 GEF LION
File.B
122 765431 ABC
125 86432 GEF... (4 Replies)
Discussion started by: Gussifinknottle
4 Replies
LEARN ABOUT LINUX
dbiprof
DBIPROF(1p) User Contributed Perl Documentation DBIPROF(1p)NAME
dbiprof - command-line client for DBI::ProfileData
SYNOPSIS
See a report of the ten queries with the longest total runtime in the profile dump file prof1.out:
dbiprof prof1.out
See the top 10 most frequently run queries in the profile file dbi.prof (the default):
dbiprof --sort count
See the same report with 15 entries:
dbiprof --sort count --number 15
DESCRIPTION
This tool is a command-line client for the DBI::ProfileData. It allows you to analyze the profile data file produced by DBI::ProfileDumper
and produce various useful reports.
OPTIONS
This program accepts the following options:
--number N
Produce this many items in the report. Defaults to 10. If set to "all" then all results are shown.
--sort field
Sort results by the given field. Sorting by multiple fields isn't currently supported (patches welcome). The available sort fields
are:
total
Sorts by total time run time across all runs. This is the default sort.
longest
Sorts by the longest single run.
count
Sorts by total number of runs.
first
Sorts by the time taken in the first run.
shortest
Sorts by the shortest single run.
key1
Sorts by the value of the first element in the Path, which should be numeric. You can also sort by "key2" and "key3".
--reverse
Reverses the selected sort. For example, to see a report of the shortest overall time:
dbiprof --sort total --reverse
--match keyN=value
Consider only items where the specified key matches the given value. Keys are numbered from 1. For example, let's say you used a
DBI::Profile Path of:
[ DBIprofile_Statement, DBIprofile_Methodname ]
And called dbiprof as in:
dbiprof --match key2=execute
Your report would only show execute queries, leaving out prepares, fetches, etc.
If the value given starts and ends with slashes ("/") then it will be treated as a regular expression. For example, to only include
SELECT queries where key1 is the statement:
dbiprof --match key1=/^SELECT/
By default the match expression is matched case-insensitively, but this can be changed with the --case-sensitive option.
--exclude keyN=value
Remove items for where the specified key matches the given value. For example, to exclude all prepare entries where key2 is the method
name:
dbiprof --exclude key2=prepare
Like "--match", If the value given starts and ends with slashes ("/") then it will be treated as a regular expression. For example, to
exclude UPDATE queries where key1 is the statement:
dbiprof --match key1=/^UPDATE/
By default the exclude expression is matched case-insensitively, but this can be changed with the --case-sensitive option.
--case-sensitive
Using this option causes --match and --exclude to work case-sensitively. Defaults to off.
--delete
Sets the "DeleteFiles" option to DBI::ProfileData which causes the files to be deleted after reading. See DBI::ProfileData for more
details.
--dumpnodes
Print the list of nodes in the form of a perl data structure. Use the "-sort" option if you want the list sorted.
--version
Print the dbiprof version number and exit.
AUTHOR
Sam Tregar <sam@tregar.com>
COPYRIGHT AND LICENSE
Copyright (C) 2002 Sam Tregar
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
SEE ALSO
DBI::ProfileDumper, DBI::Profile, DBI.
perl v5.12.3 2011-05-06 DBIPROF(1p)