09-01-2009
Yep I am looking for a script that will generate the new .SQL file when we give the original SQL file as input. And the variables will be in a list file
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Here is my pattern
CREATE USER LZ
IDENTIFIED BY VALUES 'A0144280ESD70'
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP1 PROFILE DEVELOPER_D_1
ACCOUNT UNLOCK
/
The Sed command must look for the Line that contains TEMPORARY TABLESPACE and replace the immediate word... (4 Replies)
Discussion started by: rajan_san
4 Replies
2. Shell Programming and Scripting
hi guys,
insert into /*<new>*/abc_db.tbl_name
this is should be replaced to
insert into /*<new>*/${new}.tbl_name
it should use '.' as delimiter and replace
is there any way to do it using sed (6 Replies)
Discussion started by: sol_nov
6 Replies
3. Shell Programming and Scripting
I need this.
aaa
OOOOO
bbb
ccc
OOOOO
ddd
fff
ggg
OOOOO
iii
OOOOO
I need all OOOOO replaced with PPPPP, but only change after the pattern ggg. So the first two OOOOO should not be changed.
OUTPUT should be :-
aaa (2 Replies)
Discussion started by: anilcliff
2 Replies
4. Shell Programming and Scripting
I have a pattern
username:x:32005:32006::/usr/local/user:/bin/bash
I need to match the line containing username and replace /bin/bash with /usr/local/my/bin/noshell
So it becomes
username:x:32005:32006::/usr/local/user:/usr/local/my/bin/noshell (7 Replies)
Discussion started by: anilcliff
7 Replies
5. Shell Programming and Scripting
Input file
data20714 7327 7366 detail
data20714 7327 7366 main
data250821 56532 57634 detail
data250821 57527 57634 main
data250821 57359 57474 main
data250821 57212 57301 main
data250821 57140 57159 detail
data250821 56834 57082 main
data250821 56708 56779 main ... (3 Replies)
Discussion started by: perl_beginner
3 Replies
6. Shell Programming and Scripting
I have a csv file in which i have to search a particular string and replace the data in any column with something else. How do i do it using awk.
file
------
2001,John,USA,MN,20101001,29091.50,M,Active,Y
2002,Mike,USA,NY,20090130,342.00,M,Pending,N... (3 Replies)
Discussion started by: Sheel
3 Replies
7. Shell Programming and Scripting
I have a file containing a multiple lines of the format
sddfdsf_gaf/ywrtrtwrt_gaf
ghfghfgh_ert/xcvxcvcv_ert
werwerwwerw_adf/jkhjkhjkjhkjhk_adf
I am interested in only the first 3 letters following the "_" character and make those 3 letters uppercase after extraction. So would like to convert... (5 Replies)
Discussion started by: inditopgun
5 Replies
8. Shell Programming and Scripting
I have to replace a line, if it has a pattern for example
Suppose file.out contains:
<tr><td class="cB">Hello</td><td class="cB">1245</td><td class="cB">958</td><td class="cRB">1.34</td><td class="cRB">1.36</td></tr>
<tr><td class="cB">world</td><td class="cB">3256</td><td... (8 Replies)
Discussion started by: sol_nov
8 Replies
9. Shell Programming and Scripting
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies
10. Shell Programming and Scripting
This command is not working for me.
awk '{if ($1 == server) {$1 = #server} }' /etc/ntp.conf
# grep server /etc/ntp.conf
# Use public servers from the pool.ntp.org project.
server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server... (5 Replies)
Discussion started by: kenshinhimura
5 Replies
LEARN ABOUT DEBIAN
sql::translator::filter::names
SQL::Translator::Filter::Names(3pm) User Contributed Perl Documentation SQL::Translator::Filter::Names(3pm)
NAME
SQL::Translator::Filter::Names - Tweak the names of schema objects.
SYNOPSIS
#! /usr/bin/perl -w
use SQL::Translator;
# Lowercase all table names and upper case the first letter of all field
# names. (MySql style!)
#
my $sqlt = SQL::Translator->new(
filename => @ARGV,
from => 'MySQL',
to => 'MySQL',
filters => [
Names => {
'tables' => 'lc',
'fields' => 'ucfirst',
},
],
) || die "SQLFairy error : ".SQL::Translator->error;
print($sqlt->translate) || die "SQLFairy error : ".$sqlt->error;
DESCRIPTION
SEE ALSO
perl(1), SQL::Translator
BUGS
TODO
Name Groups
Define a bunch of useful groups to run the name filters over. e.g. all, fkeys, pkeys etc.
More Functions
e.g. camelcase, titlecase, single word etc. Also a way to pass in a regexp.
May also want a way to pass in arguments for the func e.g. prefix.
Multiple Filters on the same name (filter order)?
Do we actually need this, you could just run lots of filters. Would make adding func args to the interface easier.
filters => [
[ 'Names', { all => 'lc' } ],
[ 'Names', {
tables => 'lc',
fields => 'ucfirst',
} ],
],
Mind you if you could give the filter a list this wouldn't be a problem!
filters => [
[ 'Names',
all => 'lc'
fields => 'ucfirst',
],
],
Which is nice. Might have to change the calling conventions for filters. Would also provide an order to run the filters in rather than
having to hard code it into the filter it's self.
AUTHOR
perl v5.14.2 2012-01-18 SQL::Translator::Filter::Names(3pm)