04-24-2008
Hi Era,
Thanks for the reply.
But first of all I need to identify the string inbetween the from and . and then need to replace the string identified with owner.
Because the string is not always static for different query the table names changes.
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
Discussion started by: dayamatrix
2 Replies
2. Shell Programming and Scripting
Hi,
In principle I am searching for a Perl equivalent for this sed command:
sed "/TIM_AM_ARGS=/ s/60/1440/" $EDIT_FILE > $TEMP_FILE
cp $TEMP_FILE $EDIT_FILE
I was wondering if it needs to be like this, or that there other, shorter, alternatives:
open (TIMENVFILE, "<$timenvfile") or die... (5 Replies)
Discussion started by: ejdv
5 Replies
3. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
4. Shell Programming and Scripting
Hi
Need a perl script to read lines in a file, scan for a string named "APPLE" and write to different file the only lines containing the matched string. (5 Replies)
Discussion started by: PrasannaKS
5 Replies
5. Shell Programming and Scripting
Hi,
I am taking the current time using localtime function in perl. For example if the time is:
#Using localtime
$time = "12:3:10";
I have to replace the value 3 (03) i.e second position to be 03.
The output should be:
12:03:10
But if the other string for example:
$str:... (1 Reply)
Discussion started by: vanitham
1 Replies
6. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
7. Shell Programming and Scripting
I have two files
1. input.txt
2. keyword.txt
input.txt has contents like
.src_ref 0 "call.s" 24 first
0x000000 0x5a80 0x0060 BRA.l 0x60
.src_ref 0 "call.s" 30 first
0x000002 0x1bc5 RETI
.src_ref 0 "call.s" 31 first
0x000003 0x6840 ... (2 Replies)
Discussion started by: acdc
2 Replies
8. Shell Programming and Scripting
Hello
I would like to get know how to do this:
I got a big file (about 1GB) and I need to find a string (for instance by grep )
and then find all records in this file based on a string.
Thanks for advice.
Martin (12 Replies)
Discussion started by: mape
12 Replies
9. Shell Programming and Scripting
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies
10. Shell Programming and Scripting
Trying to find and replace one string with another string in a file
#!/usr/bin/perl
$csd_table_path = "/file.ntab";
$find_str = '--bundle_type=021';
$repl_str = '--bundle_type=021 --target=/dev/disk1s2';
if( system("/usr/bin/perl -p -i -e 's/$find_str/$repl_str/' $csd_table_path")... (2 Replies)
Discussion started by: cillmor
2 Replies
LEARN ABOUT PHP
odbc_foreignkeys
ODBC_FOREIGNKEYS(3) 1 ODBC_FOREIGNKEYS(3)
odbc_foreignkeys - Retrieves a list of foreign keys
SYNOPSIS
resource odbc_foreignkeys (resource $connection_id, string $pk_qualifier, string $pk_owner, string $pk_table, string $fk_qualifier,
string $fk_owner, string $fk_table)
DESCRIPTION
Retrieves a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the
specified table
PARAMETERS
o $connection_id
-The ODBC connection identifier, see odbc_connect(3) for details.
o $pk_qualifier
- The primary key qualifier.
o $pk_owner
- The primary key owner.
o $pk_table
- The primary key table.
o $fk_qualifier
- The foreign key qualifier.
o $fk_owner
- The foreign key owner.
o $fk_table
- The foreign key table.
RETURN VALUES
Returns an ODBC result identifier or FALSE on failure.
The result set has the following columns:
oPKTABLE_QUALIFIER
oPKTABLE_OWNER
oPKTABLE_NAME
oPKCOLUMN_NAME
oFKTABLE_QUALIFIER
oFKTABLE_OWNER
oFKTABLE_NAME
oFKCOLUMN_NAME
oKEY_SEQ
oUPDATE_RULE
oDELETE_RULE
oFK_NAME
oPK_NAME
If $pk_table contains a table name, odbc_foreignkeys(3) returns a result set containing the primary key of the specified table and all of
the foreign keys that refer to it.
If $fk_table contains a table name, odbc_foreignkeys(3) returns a result set containing all of the foreign keys in the specified table and
the primary keys (in other tables) to which they refer.
If both $pk_table and $fk_table contain table names, odbc_foreignkeys(3) returns the foreign keys in the table specified in $fk_table that
refer to the primary key of the table specified in $pk_table. This should be one key at most.
PHP Documentation Group ODBC_FOREIGNKEYS(3)