Sponsored Content
Top Forums Shell Programming and Scripting Grep multiple words in a single file Post 302568468 by vgersh99 on Thursday 27th of October 2011 11:15:46 AM
Old 10-27-2011
Code:
egrep '(0 records have been inserted|Export terminated succesfully without warnings)' myLogFile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep on multiple words to match text template

hi, I have few text templates as a simple ex: template 1 city Name: zip code: state Name: template2: employee Name: Phone number: I wish to grep on given text file and make sure the text file matches one of these templates. Please give your ideas. (6 Replies)
Discussion started by: rider29
6 Replies

2. UNIX for Dummies Questions & Answers

search multiple words using grep

Hi frnds i want to desplay file names that should be word1 and word2 ex : i have 10 *.log files 5 files having word1 and word2 5 files having only word1, i have used below command egrep -l 'word1|word2' *.log its giving all 10 files, but i want to display only 5... (20 Replies)
Discussion started by: pb18798
20 Replies

3. Shell Programming and Scripting

grep multiple words in a single line

Hi.. How to search for multiple words in a single line using grep?. Eg: Jack and Jill went up the hill Jack and Jill were best friends Humpty and Dumpty were good friends too ---------- I want to extract the 2nd statement(assuming there are several statements with... (11 Replies)
Discussion started by: anduzzi
11 Replies

4. UNIX for Dummies Questions & Answers

Grep multiple strings in multiple files using single command

Hi, I will use below command for grep single string ("osuser" is search string) ex: find . -type f | xarg grep -il osuser but i have one more string "v$session" here i want to grep in which file these two strings are present. any help is appreciated, Thanks in advance. Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies

5. Shell Programming and Scripting

grep - Extracting multiple key words from stdout

Hello. From command line, the command zypper info nxclient return a bloc of data : linux local # zypper info nxclient Loading repository data... Reading installed packages... Information for package nxclient: Repository: zypper_local Name: nxclient Version: 3.5.0-7 Arch: x86_64... (7 Replies)
Discussion started by: jcdole
7 Replies

6. Shell Programming and Scripting

Grep multiple words with not null value

Hi, I want to grep a file if any one (GH, IJ, KL) is not null. If it is null i dont want to pull anything. cat file | awk '{print ($1)}' Parameters are : AB=123;CD=456;EF=6789; cat file | awk '{print ($2)}' GH=456;IJ=789;KL=1011 eg: Contents in file: Parameters are :... (10 Replies)
Discussion started by: Neethu
10 Replies

7. Shell Programming and Scripting

Confused with grep for multiple words

Hi guys and gals, I have many files that contains many lines of data. I am trying to find a needle in a haystack in that I'm looking only for files that contain word1 AND word2. I'm using ... ... but this is finding files that contains word1 OR word2. No good for me. How can I grep to... (7 Replies)
Discussion started by: bbbngowc
7 Replies

8. Shell Programming and Scripting

Single grep to multiple strings with separate output per string

I need to grep multiple strings from a particular file. I found the use of egrep "String1|String2|String3" file.txt | wc-l Now what I'm really after is that I need to separate word count per each string found. I am trying to keep it to use the grep only 1 time. Can you guys help ? ... (9 Replies)
Discussion started by: nms
9 Replies

9. UNIX for Beginners Questions & Answers

Display multiple words into a single td tag

awk 'BEGIN{print "<table>"} {print "<tr>"; for ( i=1;i<NF;i++) print " <td>" $I "</td>"; print "</tr>"} END{print " </table>"}' <file name > (6 Replies)
Discussion started by: Himanshu1
6 Replies

10. UNIX for Beginners Questions & Answers

Grep multiple words in a file with help of fixed string switch

I have multiple strings in a file which have special character $, when i search strings by ignoring $ with \ using single quotes it returns empty results. My search strings are set char_1($lock) and set new_char_clear_3($unlock) I tried searching with but it returns empty results.However... (3 Replies)
Discussion started by: g_eashwar
3 Replies
LIBMP(3)						   BSD Library Functions Manual 						  LIBMP(3)

NAME
libmp -- traditional BSD multiple precision integer arithmetic library SYNOPSIS
#include <mp.h> Function prototypes are given in the main body of the text. Applications using this interface must be linked with -lmp (this library) and -lcrypto (crypto(3)). DESCRIPTION
This interface is obsolete in favor of the crypto(3) BIGNUM library. libmp is the traditional BSD multiple precision integer arithmetic library. It has a number of problems, and is unsuitable for use in any programs where reliability is a concern. It is provided here for compatibility only. These routines perform arithmetic on integers of arbitrary precision stored using the defined type MINT. Pointers to MINT are initialized using mp_itom() or mp_xtom(), and must be recycled with mp_mfree() when they are no longer needed. Routines which store a result in one of their arguments expect that the latter has also been initialized prior to being passed to it. The following routines are defined and imple- mented: MINT *mp_itom(short n); MINT *mp_xtom(const char *s); char *mp_mtox(const MINT *mp); void mp_mfree(MINT *mp); mp_itom() returns an MINT with the value of n. mp_xtom() returns an MINT with the value of s, which is treated to be in hexadecimal. The return values from mp_itom() and mp_xtom() must be released with mp_mfree() when they are no longer needed. mp_mtox() returns a null-terminated hexadecimal string having the value of mp; its return value must be released with free() (free(3)) when it is no longer needed. void mp_madd(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_msub(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_mult(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_madd(), mp_msub(), and mp_mult() store the sum, difference, or product, respectively, of mp1 and mp2 in rmp. void mp_mdiv(const MINT *nmp, const MINT *dmp, MINT *qmp, MINT *rmp); void mp_sdiv(const MINT *nmp, short d, MINT *qmp, short *ro); mp_mdiv() computes the quotient and remainder of nmp and dmp and stores the result in qmp and rmp, respectively. mp_sdiv() is similar to mp_mdiv() except the divisor (dmp or d) and remainder (rmp or ro) are ordinary integers. void mp_pow(const MINT *bmp, const MINT *emp, const MINT *mmp, MINT *rmp); void mp_rpow(const MINT *bmp, short e, MINT *rmp); mp_rpow() computes the result of bmp raised to the empth power and reduced modulo mmp; the result is stored in rmp. mp_pow() computes the result of bmp raised to the eth power and stores the result in rmp. void mp_min(MINT *mp); void mp_mout(const MINT *mp); mp_min() reads a line from standard input, tries to interpret it as a decimal number, and if successful, stores the result in mp. mp_mout() prints the value, in decimal, of mp to standard output (without a trailing newline). void mp_gcd(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_gcd() computes the greatest common divisor of mp1 and mp2 and stores the result in rmp. int mp_mcmp(const MINT *mp1, const MINT *mp2); mcmp compares the values of mp1 and mp2 and returns 0 if the two values are equal, a value greater than 0 if mp1 is greater than mp2, and a value less than 0 if mp2 is greater than mp1. void mp_move(const MINT *smp, MINT *tmp); mp_move() copies the value of smp to tmp (both values must be initialized). void mp_msqrt(const MINT *nmp, MINT *xmp, MINT *rmp); mp_msqrt() computes the square root and remainder of nmp and stores them in xmp and rmp, respectively. IMPLEMENTATION NOTES
This version of libmp is implemented in terms of the crypto(3) BIGNUM library. DIAGNOSTICS
Running out of memory or illegal operations result in error messages on standard error and a call to abort(3). SEE ALSO
abort(3), bn(3), crypto(3), free(3), malloc(3), math(3) HISTORY
A libmp library appeared in 4.3BSD. FreeBSD 2.2 shipped with a libmp implemented in terms of libgmp. This implementation appeared in FreeBSD 5.0. BUGS
Errors are reported via output to standard error and abnormal program termination instead of via return values. The application cannot con- trol this behavior. It is not clear whether the string returned by mp_mtox() may be written to by the caller. This implementation allows it, but others may not. Ideally, mp_mtox() would take a pointer to a buffer to fill in. It is not clear whether using the same variable as both source and destination in a single invocation is permitted. Some of the calls in this implementation allow this, while others do not. BSD
September 7, 1989 BSD
All times are GMT -4. The time now is 12:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy