Sponsored Content
Top Forums Shell Programming and Scripting Match multiple patterns sequentially in order - grep or awk Post 302949983 by DSommers on Sunday 19th of July 2015 07:19:48 AM
Old 07-19-2015
RudiC, Don. I appreciate your help. Sorry to 'not' mention I wish to achieve my objective on a single line if at all possible. Thank you again. If this isn't possible, I'll pass for now. Cheers.
 

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

Perl: Match a line with multiple search patterns

Hi I'm not very good with the serach patterns and I'd need a sample how to find a line that has multiple patterns. Say I want to find a line that has "abd", "123" and "QWERTY" and there can be any characters or numbers between the serach patterns, I have a file that has thousands of lines and... (10 Replies)
Discussion started by: Juha
10 Replies

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

6. Shell Programming and Scripting

print lines which match multiple patterns

Hi, I have a text file as follows: 11:38:11.054 run1_rdseq avg_2-5 999988.0000 1024.0000 11:50:52.053 run3_rdrand 999988.0000 1135.0 128.0417 11:53:18.050 run4_wrrand avg_2-5 999988.0000 8180.5833 11:55:42.051 run4_wrrand avg_2-5 999988.0000 213.8333 11:55:06.053... (2 Replies)
Discussion started by: annazpereira
2 Replies

7. Shell Programming and Scripting

Match multiple patterns in a file and then print their respective next line

Dear all, I need to search multiple patterns and then I need to print their respective next lines. For an example, in the below table, I will look for 3 different patterns : 1) # ATC_Codes: 2) # Generic_Name: 3) # Drug_Target_1_Gene_Name: #BEGIN_DRUGCARD DB00001 # AHFS_Codes:... (3 Replies)
Discussion started by: AshwaniSharma09
3 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. Shell Programming and Scripting

awk to print match or non-match and select fields/patterns for non-matches

In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Discussion started by: cmccabe
0 Replies
CSDP(1) 						      General Commands Manual							   CSDP(1)

NAME
csdp - semidefinite program solver SYNOPSIS
csdp <problemfile> <finalsolution> <initialsolution> csdp-complement <inputgraph> <outputgraph> csdp-graphtoprob <graph> <problemfile> csdp-randgraph <rand_graph> <file> <n> <p> [<seed>] csdp-theta <graph> DESCRIPTION
This manual page documents briefly the csdp, csdp-complement, csdp-graphtoprob, csdp-randgraph and csdp-theta commands. csdp -- interface to solve general semi-definite programs csdp-complement -- compute the complement of a graph and output it in csdp problem format csdp-graphtoprob -- convert graph into csdp problem format file csdp-randgraph -- generate a random graph csdp-theta -- solves the Lovasz thetha problem OPTIONS
A summary of options is included below. For a complete description, see /usr/share/doc/coinor-csdp-doc/csdpuser.pdf. csdp inputproblem in the SDPA sparse format problemfile is the name of a file containing the SDP problem in SDPA sparse format finalsolution is the optional name of a file in which to save the final solution initialsolution is the optional name of a file from which to take the initial solution. CSDP searches for a file named param.csdp in the current directory. If no such file exists, then default values for all of CSDP's parame- ters are used. If there is a parameter file, then CSDP reads the parameter values from this file. The default parameter values is given below (can be pasted into a file): axtol=1.0e-8 atytol=1.0e-8 objtol=1.0e-8 pinftol=1.0e8 dinftol=1.0e8 maxiter=100 minstepfrac=0.90 maxstepfrac=0.97 minstepp=1.0e-8 minstepd=1.0e-8 usexzgap=1 tweakgap=0 affine=0 printlevel=1 perturbobj=1 fastmode=0 param.csdp file parameter description axtol atytol objtol tolerances for primal feasibility, dual feasibility, and relative duality gap pinftol dinftol tolerances used in determining primal and dual infeasibility maxiter plimit the total number of iterations that CSDP may use minstepfrac maxstepfrac determine how close to the edge of the feasible region CSDP will step. If the primal or dual step is shorter than min- stepp or minstepd, then CSDP declares a line search failure. usexzgap If parameter 0, then CSDP will use the objective function duality gap instead of the tr(XZ) gap tweakgap if set to 1, and usexzgap is set to 0, then CSDP will attempt to "fix" negative duality gaps. affine If parameter affine is set to 1, then CSDP will take only primal-dual affine steps and not make use of the barrier term. This can be useful for some problems that do not have feasible solutions that are strictly in the interior of the cone of semidefinite ma- tri- ces. printlevel determines how much debugging information is output. Use printlevel=0 for no output and printlevel=1 for normal output. Higher values of printlevel will generate more debugging output. perturbobj determines whether the objective function will be perturbed to help deal with problems that have unbounded optimal solution sets. If per- turbobj is 0, then the objective will not be perturbed. If perturbobj=1, then the objective function will be perturbed by a default amount. Larger values of perturbobj (e.g. 100.0) increase the size of the perturbation. This can be helpful in solving some difficult problems. fastmode determines whether or not CSDP will skip certain time consuming operations that slightly improve the accuracy of the solutions. If fastmode is set to 1, then CSDP may be somewhat faster, but also somewhat less accurate. SEE ALSO
dsdp5(1),theta(1) The programs are documented fully in the accompanying .pdf documentation which can be found in /usr/share/doc/coinor-csdp-doc if the coinor-csdp-doc package is installed. AUTHOR
csdp was written by Brian Borchers et al. This manual page was written by Soeren Sonnenburg <sonne@debian.org>, for the Debian project (but may be used by others). April 11, 2009 CSDP(1)
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy