Search Results

Search: Posts Made By: rajan_san
3,314
Posted By rajan_san
Hi, Sorry its not working.. Thanks, ...
Hi,

Sorry its not working..

Thanks,
Rajan
3,314
Posted By rajan_san
Include Line Before Pattern Using Sed / Awk
Hi,

I have a sql file that runs something like this

vi Test.sql

REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC;

REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ;

REVOKE SELECT ON...
18,023
Posted By rajan_san
sed 's/TEMPORARY TABLESPACE [^ ]* /TEMPORARY...
sed 's/TEMPORARY TABLESPACE [^ ]* /TEMPORARY TABLESPACE USERS /' 1.txt

Works perfect .. Thanks a lot....
18,023
Posted By rajan_san
Nope it doesnt seem to be working. Sed is...
Nope it doesnt seem to be working.

Sed is not able to identify the pattern at all when i use

/TEMPORARY TABLESPACE [^ ]+ /
18,023
Posted By rajan_san
Replace 1 word after pattern match
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...
3,370
Posted By rajan_san
I think it works.. Thanks a lot for the tip.. Was...
I think it works.. Thanks a lot for the tip.. Was really very useful...
3,370
Posted By rajan_san
Any Help....
Any Help....
3,370
Posted By rajan_san
awk help to do conditional find and replace
Hi,

I have a Line input for awk as follows

DROP MATERIALIZED VIEW MCR.COMM_STACK;
CREATE MATERIALIZED VIEW "MCR"."COMM_STACK"
ON PREBUILT TABLE WITHOUT REDUCED PRECISION
USING INDEX...
11,868
Posted By rajan_san
Hi, Yes you were right the below pretty...
Hi,

Yes you were right the below pretty much handles to what i exactly want

sed 's/D\:\\TOAD611\\/'I\:\\\\ToadControlFiles\\\\${ENV}\\\\${SID}\\\\'/g'

Thanks and kind regards,
Rajan
11,868
Posted By rajan_san
How To Replace A String In File With A String Containing Windows File Path
Hi,

I have a file with the following contents

# Lines that start with a # are comments.
#
# Calling TOAD like this will perform a comparison from command line :
#
# "C:\Program...
41,718
Posted By rajan_san
Hi, The above exec command worked.....
Hi,

The above exec command worked.. Thanks...

What are the commands if we would like to see the output on stdout as well as log to file. Because in case of exec the output is not being shown...
41,718
Posted By rajan_san
Capture Shell Script Output To A File
Hi,

I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to...
7,896
Posted By rajan_san
Hi, I was able to get this working using...
Hi,

I was able to get this working using the perl code below

#!/usr/bin/perl

$file = @ARGV[0];
open FILE, "<$file";
$file_contents = do { local $/; <FILE> };
if ($file_contents =~...
7,896
Posted By rajan_san
Hi, Just wanted to check if anyone could...
Hi,

Just wanted to check if anyone could help me resolve this issue.

Thanks and Kind Regards,
Rajan
7,896
Posted By rajan_san
Hi, I am unable to get to delete/print lines...
Hi,

I am unable to get to delete/print lines using the
getLinesBetweenStringContainPattern function.

The sed '$!N;/ALTER.*\n.*MOVE/,/));/d' TestFile fails if there are two continuous Alter...
7,896
Posted By rajan_san
Hi, I am new to package concept in shell...
Hi,

I am new to package concept in shell script could you quickly help me out how to use the subroutines.I am running these shell scripts on K shell.

Thanks,
Rajan
5,215
Posted By rajan_san
sed/awk help to match list of patterns and remove from org file
Hi,

From the pattern mentioned below remove lines based on pattern range.

Conditions

1 Look For all lines starting with ALTER TABLE and Ending with ; and contains the word MOVE.I wanto to...
7,896
Posted By rajan_san
Any responses please i am really stuck with this...
Any responses please i am really stuck with this for a long time and in a fatal need of a resolution to this issue.

Thanks a ton in advance,

Thanks and kind regards,
Rajan
7,896
Posted By rajan_san
Hi, Nope not quite this one is just...
Hi,

Nope not quite this one is just removing the ALTER TABLE and ; lines from the pattern and displying this rest.

Sorry for the dup post but i have the problem complete description on this...
6,033
Posted By rajan_san
SED Exclude Matches Between Pattern1 And Pattern2 Containing Pattern3 Print The Rest
Hi,

From the sample file below

Conditions

1) Pattern Range must start with "ALTER TABLE"
2) Pattern Range ends when it finds ";"
3) Between this range i want to select all the patterns...
7,896
Posted By rajan_san
One last question. Is there a way to print the...
One last question. Is there a way to print the lines excluding the pattern from the above example.
7,896
Posted By rajan_san
Works Perfect Thanks Chris And Frank....
Works Perfect Thanks Chris And Frank....
7,896
Posted By rajan_san
Getting an error on this one too $ sed -n -e...
Getting an error on this one too

$ sed -n -e '/ALTER TABLE/{N;/MOVE/!d}' -e '/ALTER TABLE/,/)\;/p' TestFile
sed: command garbled: /ALTER TABLE/{N;/MOVE/!d}
7,896
Posted By rajan_san
Hi Chris, Its giving me the below error ...
Hi Chris,

Its giving me the below error

$sed -n '/ALTER TABLE/{N;/MOVE/!d};/ALTER TABLE/,/)\;/{p}' TestFile1
sed: command garbled: /ALTER TABLE/{N;/MOVE/!d};/ALTER TABLE/,/)\;/{p}

Thanks,...
7,896
Posted By rajan_san
Sed Help.To Search Between Pattern1 And Pattern2 Containing Certain Text
Hi,

Here is a sample of my Test File

$ cat TestFile1

Prompt Table DQZ_ALTER_SCHEMA_ID;
ALTER TABLE DQZ.DQZ_ALTER_SCHEMA_ID MONITORING;
ALTER TABLE DQZ.DQZ_ALTER_SCHEMA_ID STORAGE ( NEXT...
Showing results 1 to 25 of 39

 
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy