Sponsored Content
Full Discussion: Grep patterns
Top Forums Shell Programming and Scripting Grep patterns Post 302877058 by navsan420 on Thursday 28th of November 2013 01:13:12 AM
Old 11-28-2013
Grep patterns

Hi Experts,

I have a log file like this.I need to filter the Index name and elapsed time(only created ).

Code:
06:36:39 SQL> create    index XYZ_F75 on XYZ
06:36:39   2  ("GRP_ID", "_ID") parallel 64 nologging
06:36:39   3  tablespace XARGS_IDX
06:36:39   4  ;

Index created.

Elapsed: 00:08:08.58
06:44:48 SQL> alter index XYZ_F75 noparallel logging
06:44:48   2  ;

Index altered.

Elapsed: 00:00:00.07
06:44:48 SQL>   commit
06:44:48   2  ;

Commit complete.

Elapsed: 00:00:00.00
06:44:48 SQL> create    index XYZ_F81 on XYZ
06:44:48   2  ("ITEM_ID") parallel 64 nologging
06:44:48   3  tablespace XARGS_IDX
06:44:48   4  ;

Index created.

Elapsed: 00:07:35.24
06:52:23 SQL> alter index XYZ_F81 noparallel logging
06:52:23   2  ;

Index altered.

Elapsed: 00:00:00.07
06:52:23 SQL>   commit
06:52:23   2  ;

Commit complete.

Elapsed: 00:00:00.00
06:52:23 SQL> create    index XYZ_F83 on XYZ
06:52:23   2  ("GROUP_ID") parallel 64 nologging
06:52:23   3  tablespace XARGS_IDX
06:52:23   4  ;

Index created.

Elapsed: 00:07:07.32
06:59:30 SQL> alter index XYZ_F83 noparallel logging
06:59:30   2  ;

Index altered.

Elapsed: 00:00:00.07

Required output
Code:
INDEX NAME    ELAPSED TIME
XYZ_F75              00:08:08.58
XYZ_F81              00:07:35.24
XYZ_F83              00:07:07.32

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep for multiple patterns

I want to get a list of all the files in the current directory that have two patterns. I can do first grep of one pattern and then with the output do the grep of the second pattern. if the output of 1st pattern search results in many files, it is very difficult to do a grep of the 2nd pattern for... (1 Reply)
Discussion started by: tselvanin
1 Replies

2. Shell Programming and Scripting

Grep multiple patterns

Hi, Can we grep multiple patterns in UNIX. for example: cat /x/y/oratab | grep -i "pattern1|pattern2" .... etc I require the syntax for multiple patterns. | is not working as I explained in example. Malay (4 Replies)
Discussion started by: malaymaru
4 Replies

3. Shell Programming and Scripting

Grep for Multiple patterns

Hi All, I have a file. I need to find multiple patterns in a row and need those rows to divert to new file. I tried using grep -e / -E / -F options as given in man. But its not working. ==> cat testgrep.txt william,fernandes,xxxxx mark,morsov,yyyy yy=,xx= yyyy=,xxxx== ==>... (7 Replies)
Discussion started by: WillImm123
7 Replies

4. Shell Programming and Scripting

grep patterns - File

Hi I have 3 patterns for example to be searched. These three patterns are available in file1. The patterns to be searched are in file2. I want to search the pattern of file1 to file2. Can any one help with example? Regards Dhana (1 Reply)
Discussion started by: dhanamurthy
1 Replies

5. Shell Programming and Scripting

Grep All lines between 2 different patterns

I need a simple script to get all lines between 2 Patterns, e.g. ............. ............. 114456723: testing Script Alpha Beta 114459234: testing Done ............. ............. It should give all the lines in between 114456723 and 114459234, including these as well. Any... (2 Replies)
Discussion started by: gurpreet470
2 Replies

6. Shell Programming and Scripting

grep or sed patterns

i want to match a pattern * ^Subject:.*<\hello\> for my emails to me that has 'hello' anywhere in the subject. (3 Replies)
Discussion started by: oxoxo
3 Replies

7. Shell Programming and Scripting

grep for multiple patterns

I have a file with many rows. I want to grep for multiple patterns from the file. For eg: XX=123|YY=222|ZZ=566 AA=123|EE=222|GG=566 FF=123|RR=222|GG=566 DD=123|RR=222|GG=566 I want the lines which has both XX and ZZ. I know I can get it like this. grep XX file | grep YY But... (10 Replies)
Discussion started by: tene
10 Replies

8. Shell Programming and Scripting

grep value between two patterns

Hi All, I've been trying solve this with a simple command but not having much luck. I have a file like this: Line 1: random_description 123/alert/high random_description2 356/alert/slow Line 2: random_description3 654/alert/medium Line 3: random_description4 234/alert/critical I'm... (7 Replies)
Discussion started by: joe19
7 Replies

9. UNIX for Dummies Questions & Answers

Grep - various patterns

I have a file with the following text: grep \$ grep \\$ grep \\\$ grep '\$' grep '\'$' grep \\ grep \\\\ grep "\$" grep '"$' grep "$" When I perform these same commands on this file, the result are never what I would expect them to be. Could someone please comment on the results and... (3 Replies)
Discussion started by: uran101
3 Replies

10. Shell Programming and Scripting

How to use grep with multiple patterns?

I am trying to grep a variable with multiple lines with multiple patterns below is the pattern list in a variable called "grouplst", each pattern is speerated by "|" grouplst="example1|example2|example3|example4|example5|example6|example7" I need to use the patterns above to grep a... (2 Replies)
Discussion started by: ajetangay
2 Replies
DROP 
TABLESPACE(7) SQL Commands DROP TABLESPACE(7) NAME
DROP TABLESPACE - remove a tablespace SYNOPSIS
DROP TABLESPACE [ IF EXISTS ] tablespacename DESCRIPTION
DROP TABLESPACE removes a tablespace from the system. A tablespace can only be dropped by its owner or a superuser. The tablespace must be empty of all database objects before it can be dropped. It is possible that objects in other databases might still reside in the tablespace even if no objects in the current database are using the tablespace. Also, if the tablespace is listed in the temp_tablespaces setting of any active session, the DROP might fail due to temporary files residing in the tablespace. PARAMETERS
IF EXISTS Do not throw an error if the tablespace does not exist. A notice is issued in this case. tablespacename The name of a tablespace. NOTES
DROP TABLESPACE cannot be executed inside a transaction block. EXAMPLES
To remove tablespace mystuff from the system: DROP TABLESPACE mystuff; COMPATIBILITY
DROP TABLESPACE is a PostgreSQL extension. SEE ALSO
CREATE TABLESPACE [create_tablespace(7)], ALTER TABLESPACE [alter_tablespace(7)] SQL - Language Statements 2010-05-14 DROP TABLESPACE(7)
All times are GMT -4. The time now is 03:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy