06-11-2007
tricky search replace: Pls help.
Hi,
I have a a mysql dump text file.
I need to replace the below line
-------------------------------------------------------------------
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
-------------------------------------------------------------------
with this text
-------------------
) TYPE=MyISAM;
-------------------
using a shell script.
How can I do this.
Please help.
Thank you in advance.
regards,
Vai
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
the problem is like this...... i setup a file (Env.txt) which handles all the values.
NAME1=xxxxxx, where xxxxx is the value
NAME2=xxxxxx
GGGGG=uusufu
I have 6 files, where i will append the values from env.txt. These files has no specific format. all i want is to append the... (1 Reply)
Discussion started by: tungaw2004
1 Replies
2. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
3. Shell Programming and Scripting
i have the following create table definition ,the shell script has to search for the first column name of the create table definition in the file and explicitly add primary index (first column name) at the end i.e before ";"
it has to search through all the files (say 20 files) and has to... (1 Reply)
Discussion started by: a.suryakumar
1 Replies
4. Shell Programming and Scripting
help pls...
i would like to change this
CURVE2 565489 789458 1258649
random data here...
CURVE2 565489 568795 6548921
random data here...
CURVE2 565489 123598 6446259
random data here...
CURVE2 565489 672956 2489657
into this
CURVE2 565489 586423 1258649
random data here...... (2 Replies)
Discussion started by: lakanino
2 Replies
5. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
6. Shell Programming and Scripting
sed replace not work Pls. help me
I used sed command in my file
66875964560@1982589 90825890001@90825890001@3@15/12/2007 14:25:14@22/03/2010 6:06:13@20/01/2010 3:28:39
66873064490@1925912 90259120001@90259120001@5@02/04/2009 1:51:31@30/10/2009 3:08:34@13/09/2009 8:24:33... (3 Replies)
Discussion started by: ooilinlove
3 Replies
7. Shell Programming and Scripting
Hi!!!
I have following xml file with 3 sections.
aaa1bbb-ccc
default
aaa1bbbdd
default
0 11 23 * *
aaa2bbb-ccc
default
aaa2bbbdd
default
0 11 23 * *
aaa3bbb-ccc
default
aaa3bbbdd
default
0 15 23 * * (15 Replies)
Discussion started by: tdev457
15 Replies
8. Shell Programming and Scripting
Dear All,
i want to search particular string and want to replance next line value.
following is the test file.
search string is
tmp,???
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I am editing a config file in vi that has a / on it.
At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g
For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Discussion started by: newbie_01
2 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to unix, please help me in this.
I have a file named properties.
The content of the file is :
##Mobile props
east.url=https://qa.east.corp.com/prop/end
west.url=https://qa.west.corp.com/prop/end
south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
LEARN ABOUT LINUX
mysql_convert_table_format
MYSQL_CONVERT_TAB(1) MySQL Database System MYSQL_CONVERT_TAB(1)
NAME
mysql_convert_table_format - convert tables to use a given storage engine
SYNOPSIS
mysql_convert_table_format [options] db_name
DESCRIPTION
mysql_convert_table_format converts the tables in a database to use a particular storage engine (MyISAM by default).
mysql_convert_table_format is written in Perl and requires that the DBI and DBD::mysql Perl modules be installed (see Section 2.13, "Perl
Installation Notes").
Invoke mysql_convert_table_format like this:
shell> mysql_convert_table_format [options]db_name
The db_name argument indicates the database containing the tables to be converted.
mysql_convert_table_format supports the options described in the following list.
o --help
Display a help message and exit.
o --force
Continue even if errors occur.
o --host=host_name
Connect to the MySQL server on the given host.
o --password=password
The password to use when connecting to the server. Note that the password value is not optional for this option, unlike for other MySQL
programs.
Specifying a password on the command line should be considered insecure. See Section 6.1.2.1, "End-User Guidelines for Password
Security". You can use an option file to avoid giving the password on the command line.
o --port=port_num
The TCP/IP port number to use for the connection.
o --socket=path
For connections to localhost, the Unix socket file to use.
o --type=engine_name
Specify the storage engine that the tables should be converted to use. The default is MyISAM if this option is not given.
o --user=user_name
The MySQL user name to use when connecting to the server.
o --verbose
Verbose mode. Print more information about what the program does.
o --version
Display version information and exit.
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 MYSQL_CONVERT_TAB(1)