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)
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)
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)
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)
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,
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)
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)
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
LEARN ABOUT DEBIAN
qstat
QSTAT(1) User Contributed Perl Documentation QSTAT(1)NAME
qstat - display job/partition information in a familiar pbs format
SYNOPSIS
qstat [-f] [-a|-i|-r] [-n [-1]] [-G|-M] [-u user_list] [-? | --help] [--man] [job_id...]
qstat -Q [-f]
qstat -q
DESCRIPTION
The qstat command displays information about jobs.
OPTIONS -a Displays all jobs in a single-line format. See the STANDARD OUTPUT section for format details.
-i Displays information about idle jobs. This includes jobs which are queued or held.
-f Displays the full information for each selected job in a multi-line format. See the STANDARD OUTPUT section for format details.
-G Display size information in gigabytes.
-M Show size information, disk or memory in mega-words. A word is considered to be 8 bytes.
-n Displays nodes allocated to a job in addition to the basic information.
-1 In combination with -n, the -1 option puts all of the nodes on the same line as the job id.
-r Displays information about running jobs. This includes jobs which are running or suspended.
-u user_list
Display job information for all jobs owned by the specified user(s). The format of user_list is: user_name[,user_name...].
-? | --help
brief help message
--man
full documentation
STANDARD OUTPUT
Displaying Job Status
If the -a, -i, -f, -r, -u, -n, -G, and -M options are not specified, the brief single-line display format is used. The following items are
displayed on a single line, in the specified order, separated by white space:
the job id
the job name
the job owner
the cpu time used
the job state
C - Job is completed after having run E - Job is exiting after having run. H - Job is held. Q - job is queued, eligible to run or
routed. R - job is running. T - job is being moved to new location. W - job is waiting for its execution time (-a option) to be
reached. S - job is suspended.
the queue that the job is in
If the -f option is specified, the multi-line display format is used. The output for each job consists of the header line: Job Id: job
identifier followed by one line per job attribute of the form: attribute_name = value
If any of the options -a, -i, -r, -u, -n, -G or -M are specified, the normal single-line display format is used. The following items are
displayed on a single line, in the specified order, separated by white space:
the job id
the job owner
the queue the job is in
the job name
the session id (if the job is running)
the number of nodes requested by the job
the number of cpus or tasks requested by the job
the amount of memory requested by the job
either the cpu time, if specified, or wall time requested by the job, (in hh:mm)
the job state
The amount of cpu time or wall time used by the job (in hh:mm)
EXIT STATUS
On success, qstat will exit with a value of zero. On failure, qstat will exit with a value greater than zero.
perl v5.14.2 2012-04-10 QSTAT(1)