Sponsored Content
Top Forums Shell Programming and Scripting Duplicate Line Report per Section Post 302391887 by petersf on Tuesday 2nd of February 2010 08:46:29 PM
Old 02-02-2010
That Worked!!!!!

Thank you "radoulov" for helping me out with this!

Could you explain this part?
Code:
"h=$2_[h,$2,$3]"

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help find a section line of a file

hi, I have a 20 line file. I need a command which will brinf back a specific line based upon the line number I enter. e.g. the file looks like this and is called file1 jim is a man john is a woman james is a man wendy is a woman lesley is a woman i want a command that will... (4 Replies)
Discussion started by: sureshy
4 Replies

2. Shell Programming and Scripting

Using Sed to duplicate a section of a file....

hello all, I have a file like this: section 1 blah1 blah2 section 2 blah1 blah2 section 3 blah1 blah2 and I want to use sed to duplicate section 2, like this: section 1 blah1 blah2 section 2 blah1 blah2 section 2 blah1 (2 Replies)
Discussion started by: nick26
2 Replies

3. Shell Programming and Scripting

Remove certain section from the line

A typical line looks like this... ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=129 COMMENT='Compiled E-Mails';I want to remove DEFAULT CHARSET= and COLLATE= after resetting AUTO_INCREMENT=0 I do not want to change the engine and comment. (7 Replies)
Discussion started by: shantanuo
7 Replies

4. Shell Programming and Scripting

how to retreive certain section of the line

Hi I am using "grep" command to get certain pattern out of the file: PNUM=34 $ grep -w "#${PNUM}" myfile #34 * 2297 * 410 * 964 * * 4352 $ Is there a way to retrieve the section of the above output without #34 so the output would look like this:... (3 Replies)
Discussion started by: aoussenko
3 Replies

5. Shell Programming and Scripting

Removing Duplicate Lines per Section

Hello, I am in need of removing duplicate lines from within a file per section. File: ABC1 012345 header ABC2 7890-000 ABC3 012345 Header Table ABC4 ABC5 593.0000 587.4800 ABC5 593.5000 587.6580 <= dup need to remove ABC5 593.5000 ... (5 Replies)
Discussion started by: petersf
5 Replies

6. Shell Programming and Scripting

Placing Duplicate Lines per section into another file

Hello, I need help in putting duplicate lines within a section into another file. Here is what I'm struggling with: Using this file “data.txt”: ABC1 012345 header ABC2 7890-000 ABC3 012345 Header Table ABC4 ABC5 593.0000 587.4800 ABC5 593.5000 587.6580 <= dup need to remove ABC5... (4 Replies)
Discussion started by: petersf
4 Replies

7. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

8. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

9. Shell Programming and Scripting

Print the first n line in each section

Hi, i have a file like this: ... 11111111 22222222 33333333 # 4444444 5555555 6666666 7777777 # ... i want just print the 2 first line between each section (each section is separated with "#"). so desired output would be like this: ... 11111111 22222222 (3 Replies)
Discussion started by: saeed.soltani
3 Replies

10. Shell Programming and Scripting

How to change file section into each line?

Hi Gurus, I have below file which has different sections, need to move the sections to beginning of the each record. original file aaa bbb ccc ddd eee fff output file. aaa bbb ccc ddd eee fff (6 Replies)
Discussion started by: green_k
6 Replies
NDB_MGM(1)						       MySQL Database System							NDB_MGM(1)

NAME
ndb_mgm - the MySQL Cluster management client SYNOPSIS
ndb_mgm options DESCRIPTION
The ndb_mgm management client process is actually not needed to run the cluster. Its value lies in providing a set of commands for checking the cluster's status, starting backups, and performing other administrative functions. The management client accesses the management server using a C API. Advanced users can also employ this API for programming dedicated management processes to perform tasks similar to those performed by ndb_mgm. To start the management client, it is necessary to supply the host name and port number of the management server: shell> ndb_mgm [host_name [port_num]] For example: shell> ndb_mgm ndb_mgmd.mysql.com 1186 The default host name and port number are localhost and 1186, respectively. The following table includes options that are specific to the MySQL Cluster management client program ndb_mgm. Additional descriptions follow the table. For options common to most MySQL Cluster programs (including ndb_mgm), see Options Common to MySQL Cluster Programs(1). Table 17.13. ndb_mgm Options and Variables: MySQL Cluster NDB 7.2 +--------------------------+-----------------------------+-------------------------------------+ |Format | Description | Added / Removed | +--------------------------+-----------------------------+-------------------------------------+ | | Specify number of tries for | | | --try-reconnect=#, | connecting to ndb_mgmd (0 = | All MySQL 5.5 based releases | | | infinite) | | | -t | | | +--------------------------+-----------------------------+-------------------------------------+ | | Execute command and exit | | | --execute=name, | | All MySQL 5.5 based releases | | | | | | -e | | | +--------------------------+-----------------------------+-------------------------------------+ o --execute=command, -e command +--------------------+----------------+ |Command-Line Format | --execute=name | +--------------------+----------------+ | | -e | +--------------------+----------------+ This option can be used to send a command to the MySQL Cluster management client from the system shell. For example, either of the following is equivalent to executing SHOW in the management client: shell> ndb_mgm -e "SHOW" shell> ndb_mgm --execute="SHOW" This is analogous to how the --execute or -e option works with the mysql command-line client. See Section 4.2.3.1, "Using Options on the Command Line". Note If the management client command to be passed using this option contains any space characters, then the command must be enclosed in quotation marks. Either single or double quotation marks may be used. If the management client command contains no space characters, the quotation marks are optional. o --try-reconnect=number +--------------------+-------------------+ |Command-Line Format | --try-reconnect=# | +--------------------+-------------------+ | | -t | +--------------------+-------------------+ | | Permitted Values | | +---------+---------+ | | Type | boolean | | +---------+---------+ | | Default | TRUE | +--------------------+---------+---------+ If the connection to the management server is broken, the node tries to reconnect to it every 5 seconds until it succeeds. By using this option, it is possible to limit the number of attempts to number before giving up and reporting an error instead. Additional information about using ndb_mgm can be found in Section 17.5.2, "Commands in the MySQL Cluster Management Client". COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 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
Oracle Corporation (http://dev.mysql.com/). MySQL 5.5 01/30/2014 NDB_MGM(1)
All times are GMT -4. The time now is 07:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy