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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT OSX
alter_index
ALTER INDEX(7) SQL Commands ALTER INDEX(7)NAME
ALTER INDEX - change the definition of an index
SYNOPSIS
ALTER INDEX name RENAME TO new_name
ALTER INDEX name SET TABLESPACE tablespace_name
ALTER INDEX name SET ( storage_parameter = value [, ... ] )
ALTER INDEX name RESET ( storage_parameter [, ... ] )
DESCRIPTION
ALTER INDEX changes the definition of an existing index. There are several subforms:
RENAME The RENAME form changes the name of the index. There is no effect on the stored data.
SET TABLESPACE
This form changes the index's tablespace to the specified tablespace and moves the data file(s) associated with the index to the new
tablespace. See also CREATE TABLESPACE [create_tablespace(7)].
SET ( storage_parameter = value [, ... ] )
This form changes one or more index-method-specific storage parameters for the index. See CREATE INDEX [create_index(7)] for details
on the available parameters. Note that the index contents will not be modified immediately by this command; depending on the parame-
ter you might need to rebuild the index with REINDEX [reindex(7)] to get the desired effects.
RESET ( storage_parameter [, ... ] )
This form resets one or more index-method-specific storage parameters to their defaults. As with SET, a REINDEX might be needed to
update the index entirely.
PARAMETERS
name The name (possibly schema-qualified) of an existing index to alter.
new_name
The new name for the index.
tablespace_name
The tablespace to which the index will be moved.
storage_parameter
The name of an index-method-specific storage parameter.
value The new value for an index-method-specific storage parameter. This might be a number or a word depending on the parameter.
NOTES
These operations are also possible using ALTER TABLE [alter_table(7)]. ALTER INDEX is in fact just an alias for the forms of ALTER TABLE
that apply to indexes.
There was formerly an ALTER INDEX OWNER variant, but this is now ignored (with a warning). An index cannot have an owner different from its
table's owner. Changing the table's owner automatically changes the index as well.
Changing any part of a system catalog index is not permitted.
EXAMPLES
To rename an existing index:
ALTER INDEX distributors RENAME TO suppliers;
To move an index to a different tablespace:
ALTER INDEX distributors SET TABLESPACE fasttablespace;
To change an index's fill factor (assuming that the index method supports it):
ALTER INDEX distributors SET (fillfactor = 75);
REINDEX INDEX distributors;
COMPATIBILITY
ALTER INDEX is a PostgreSQL extension.
SEE ALSO
CREATE INDEX [create_index(7)], REINDEX [reindex(7)]
SQL - Language Statements 2010-05-14 ALTER INDEX(7)