10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file like below.
1,2,3,4,5,6,7,8,9I would like to print or copied to a file based of line count in perl
If I gave a condition 1 to 3 then it should iterate over above file and print 1 to 3 and then again 1 to 3 etc.
output should be
1,2,3
4,5,6
7,8,9 (10 Replies)
Discussion started by: Anjan1
10 Replies
2. Shell Programming and Scripting
Here is an example of a file...
foo1,good
foo1,good
foo2,error
foo2,good
Note that both rows for foo1 have good in the 2nd field, but one of the foo2 rows has error...
I need something in ksh/awk/perl that will delete ALL foo2 lines if ANY of them have error in the 2nd field...so:
... (7 Replies)
Discussion started by: dbiggied
7 Replies
3. Shell Programming and Scripting
hello everyone
my file contains many records, the following is a sample:
BEGIN
ASX1500000050002010120000000308450201012000177
ASX1100002000000201012000000038450201012000220
ASX1600100005000201012000000038450020101200177
ASX1900100006000201067000000058450020101200177... (2 Replies)
Discussion started by: neemoze
2 Replies
4. Shell Programming and Scripting
Sample input (line feed indicated by )
---------------
The red fox jumped
over the brown fence of the
red hous
He then went into the
orchard
---------------
Desired Output
---------------
The red fox jumped over the brown fence of the red house
He then went into the orchard (11 Replies)
Discussion started by: dunstonrocks
11 Replies
5. Shell Programming and Scripting
I've got a log file from automatic diagnostic runs. The log file is appended to each time an automatic log is run.
I'd like to just pull certain lines from each run in the log file, and concatenate them into 1 comma delimited line (for export into excel or an html table).
Each diagnostic run... (3 Replies)
Discussion started by: BecTech
3 Replies
6. UNIX for Advanced & Expert Users
Hi
I am getting a source file where the columns are seperated by comma and double Quotes
Eg1 : "AAA","BBB","CCCC"
in the same source file i am also getting few lines where my last columns double quotes are ending in its next line or the next next line
Eg2: "AAA","BBB","CCC
CC"... (9 Replies)
Discussion started by: laxmi131
9 Replies
7. Shell Programming and Scripting
write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers:b:.help is appreciated.thank you. (3 Replies)
Discussion started by: shawz
3 Replies
8. UNIX for Advanced & Expert Users
I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line.
2 lines from log:
2007-10-23 11:39:17,061 DEBUG - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN... (1 Reply)
Discussion started by: vithala
1 Replies
9. UNIX for Dummies Questions & Answers
I have a file that has 1k lines and i want to print all the lines after 900th line.
an 2)I want to move files f1 ,f2,f3,f4 to p1,p2,p3,p4
Please give me the commands.
Thanx in adv. (6 Replies)
Discussion started by: rajashekar.y
6 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I would like to know , how to concatenate two command in one line and get the display in one screen
for eg
command 1 : ls -l /data/logs
command 2 : ls -l /data/errors
output shd be
/data/logs /data/errors
xx-xx-xx-xx abc.log xx-xx-xx-xx... (9 Replies)
Discussion started by: vasikaran
9 Replies
MYSQL_FIND_ROWS MySQL Database System MYSQL_FIND_ROWS
NAME
mysql_find_rows - extract SQL statements from files
SYNOPSIS
mysql_find_rows [options] [file_name ...]
DESCRIPTION
mysql_find_rows reads files containing SQL statements and extracts statements that match a given regular expression or that contain USE
db_name or SET statements. The utility was written for use with update log files (as used prior to MySQL 5.0) and as such expects
statements to be terminated with semicolon (;) characters. It may be useful with other files that contain SQL statements as long as
statements are terminated with semicolons.
Invoke mysql_find_rows like this:
shell> mysql_find_rows [options] [file_name ...]
Each file_name argument should be the name of file containing SQL statements. If no file names are given, mysql_find_rows reads the
standard input.
Examples:
mysql_find_rows --regexp=problem_table --rows=20 < update.log
mysql_find_rows --regexp=problem_table update-log.1 update-log.2
mysql_find_rows supports the following options:
o --help, --Information
Display a help message and exit.
o --regexp=pattern
Display queries that match the pattern.
o --rows=N
Quit after displaying N queries.
o --skip-use-db
Do not include USE db_name statements in the output.
o --start_row=N
Start output from this row.
COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
at http://dev.mysql.com/doc/.
AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/).
MySQL 5.1 04/06/2010 MYSQL_FIND_ROWS