Sponsored Content
Top Forums Shell Programming and Scripting Grep multiple patterns that contain wildcards Post 302920133 by Corona688 on Tuesday 7th of October 2014 12:55:35 PM
Old 10-07-2014
Show the working, separate expressions please. A program that doesn't do what you want isn't much help figuring out what you do want.
 

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

To grep multiple patterns with space in between them......

Hii... Every One...... I want to grep multiple patterns with space in between them. For eg : I have a file which contains following : red cat every one new one you are an ox take one Now, what I want to do is to grep " you are" , "an ox" and "red cat" from this file. Any help........ (5 Replies)
Discussion started by: prashantshukla
5 Replies

5. Shell Programming and Scripting

grep multiple patterns + the whole word only

Guys, i used egrep "pattern1|pattern2". But the whole word is searched. But i want the output if only the exact word is matched. i.e the output is got evenif a part of the pattern is matched. I tried the -w opion but its showing usage error. Please help me out on this one. please sent me... (2 Replies)
Discussion started by: meheretoknow
2 Replies

6. Shell Programming and Scripting

grep multiple patterns in number of files

Hi, I want to list the files containing a no of pattern like for single string i can use grep -l "string" * This command will enlist the files containg this string. Similarly i would like to use for multiple string. I like to enlist file names having string1 and string 2 Can... (3 Replies)
Discussion started by: vikash_k
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 from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Grep multiple patterns(file) and replace whole line

I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string? For example: pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies
NTFSCLUSTER(8)						      System Manager's Manual						    NTFSCLUSTER(8)

NAME
ntfscluster - identify files in a specified region of an NTFS volume. SYNOPSIS
ntfscluster [options] device DESCRIPTION
ntfscluster has three modes of operation: info, sector and cluster. Info The default mode, info is currently not implemented. It will display general information about the NTFS volume when it is working. Sector The sector mode will display a list of files that have data in the specified range of sectors. Cluster The cluster mode will display a list of files that have data in the specified range of clusters. When the cluster size is one sector, this will be equivalent to the sector mode of operation. OPTIONS
Below is a summary of all the options that ntfscluster accepts. Nearly all options have two equivalent names. The short name is preceded by - and the long name is preceded by --. Any single letter options, that don't take an argument, can be combined into a single command, e.g. -fv is equivalent to -f -v. Long named options can be abbreviated to any unique prefix of their name. -c, --cluster RANGE Any files whose data is in this range of clusters will be displayed. -F, --filename NAME Show information about this file. -f, --force This will override some sensible defaults, such as not working with a mounted volume. Use this option with caution. -h, --help Show a list of options with a brief description of each one. -I, --inode NUM Show information about this inode. -i, --info This option is not yet implemented. -q, --quiet Reduce the amount of output to a minimum. Naturally, it doesn't make sense to combine this option with -s, --sector RANGE Any files whose data is in this range of sectors will be displayed. -v, --verbose Increase the amount of output that ntfscluster prints. -V, --version Show the version number, copyright and license for ntfscluster. EXAMPLES
Get some information about the volume /dev/hda1. ntfscluster /dev/hda1 Look for files in the first 500 clusters of /dev/hda1. ntfscluster -c 0-500 /dev/hda1 BUGS
The info mode isn't implemented yet. ntfscluster is quite limited, but it has no known bugs. If you find a bug please send an email describing the problem to the development team: linux-ntfs-dev@lists.sourceforge.net AUTHORS
ntfscluster was written by Richard Russon, with contributions from Anton Altaparmakov. AVAILABILITY
ntfscluster is part of the ntfsprogs package and is available from: http://www.linux-ntfs.org/content/view/19/37 The manual pages are available online at: http://man.linux-ntfs.org/ SEE ALSO
ntfsinfo(8), ntfsprogs(8) ntfsprogs 1.13.1 November 2005 NTFSCLUSTER(8)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy