Sponsored Content
Top Forums Shell Programming and Scripting How to from grep command from a file which contains matching words? Post 302218384 by johnl on Friday 25th of July 2008 03:14:39 AM
Old 07-25-2008
How to from grep command from a file which contains matching words?

Hi all

I have a file with below content (content is variable whenever new product is launched). I need form a grep command like this
egrep "Unknown product|Invalid symboland so on"
How to do it using a script?

Unknown product
Invalid symbol
No ILX exch found
exceeds maximum size
AFX Industry Code INT not found
time conversion error
DJ_Parser_Service::handle_not_found
Duplicate Key so rejecting
 

10 More Discussions You Might Find Interesting

1. Programming

getting file words as pattern matching

Sir, I want to check for the repation of a user address in a file i used || as my delimiter and want to check repetaip0n of the address that is mailid and then i have to use IMAP and all. How can i do this... I am in linux ...and my file is linux file. ... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

2. Shell Programming and Scripting

Usage of grep command to extract only the words.

Dear Folks, I am a newbee to UNIX. I want to extract the SQLSTATE from a log file. For example the log file content is SQL0010N The string constant beginning with "' from table1 a, table 2" does not have an ending string delimiter. SQLSTATE=42603 when I give the the command as ... (4 Replies)
Discussion started by: dinesh1985
4 Replies

3. Shell Programming and Scripting

recursively Grep particular words among lines from a file

dear experts, Could you please help me to write a command/script to find follwing: from the log file i want to grep "resCode89270200100001552311" after that only "<resultCode>40614</resultCode>" it will be like that: resCode89270200100001552311 <resultCode>40614</resultCode> ... (7 Replies)
Discussion started by: thepurple
7 Replies

4. Shell Programming and Scripting

grep words from output file

Hi, By using shell scripit i have save output in one file. I want to grep two words named CLUSTER and CLUSQMGR from that output file. How to grep that. output file would be having below words TYPE(QCLUSTER) ALTDATE(2010-05-17) CLUSTER(QS.CL.MFT1) ... (5 Replies)
Discussion started by: darling
5 Replies

5. Shell Programming and Scripting

Grep multiple words in a single file

Hello All, I'm a newbie/rookie in Shell scipting. I've done oracle export of a table using Export utility. When I do export, it generates 2 files. 1> .dmp file 2> .dmp.log file. In .dmp.log file I have to search for a sentence which goes like '0 records have been inserted' and then... (2 Replies)
Discussion started by: samfisher
2 Replies

6. Shell Programming and Scripting

grep for words in file

Hi Please can you help me on this: How to grep for multiple words in a file, BUT for every word found output it to a new line. regards FR (8 Replies)
Discussion started by: fretagi
8 Replies

7. Shell Programming and Scripting

Understanding pattern matching used in a grep command

I have the following code. I want to remove the --sort=num/num/... and am using grep to exclude it as shown below: I have a bit of problem figuring out the use of - at the front echo "--sort=4/5/6" | grep -ivE '-((sort|group)=+/+(/+)*)$' Now suppose I want to remove --quiet I can... (7 Replies)
Discussion started by: kristinu
7 Replies

8. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

9. UNIX for Beginners Questions & Answers

How to replace matching words defined in one file on another file?

I have file1 and file2 as shown below, file1: ((org14/1-131541:0.11535,((org29/1-131541:0.00055,org7/1-131541:0.00055)1.000:0.10112,((org17/1-131541:0.07344,(org23/1-131541:0.07426,((org10/1-131541:0.00201,org22/1-131541:0.00243)1.000:0.02451, file2: org14=india org29=america... (5 Replies)
Discussion started by: dineshkumarsrk
5 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
newinv(1)						      General Commands Manual							 newinv(1)

NAME
newinv - Updates distribution kit master inventory SYNOPSIS
/usr/bin/newinv mi-file input-path... OPERANDS
The pathname of the master inventory file to be processed. If no master inventory file exists, you must create an empty one before using the newinv command. The name of the product hierarchy to be scanned for files belonging in the inventory. All files and directories found below the input-path are processed as belonging in the inventory. DESCRIPTION
The newinv command interactively maintains the master inventory files used for producing distribution kits in setld format. The program updates the master inventory for a product when changes are made to the hierarchy of files that are to be packaged in the subsets which constitute the product. The product hierarchy is scanned to produce a list of component path names relative to input-path. The list of pathnames is processed against the mi-file to produce a list of files that have been removed from the product hierarchy and a list of files that have been added. The user is then given an opportunity to intervene and direct the inventory maintenance by editing these lists. The user is placed in the editor with each list available for editing. The editor used is the one specified by the EDITOR environment variable. If EDITOR is not set, vi is used. When editing the list of files that have been removed from the product, the user is expected to verify that the removals were intentional and confirm the intent by removing the associated records from the file. When editing the list of added files, the user is expected to provide options and subset information for each new file, transforming the elements of the list into master inventory records. To produce a new copy of the master inventory file, both of these lists are merged with the records for the files which existed in the pre- vious version and are still included. RESTRICTIONS
The default text editor, if not specified in $EDITOR, is /usr/ucb/vi. Files in the product hierarchy cannot be excluded from the master inventory. Files can be blocked from being kitted in the final distribu- tion kit by setting the subset field of the master inventory record to a minus sign (-). ERRORS
The mi-file specified on the command line cannot be found. The input-path directory specified on the command line does not exist. EXAMPLES
To update the hypothetical master inventory file OAT100.mi from the hierarchy beginning at /var/kits/input, type: newinv OAT100.mi /var/kits/input FILES
Backup copy of master inventory The list of files missing from the product The list of files new to the product Intermediate join file List of all files in the product SEE ALSO
invcutter(1), kits(1), vi(1), setld(8) stl_mi(4) environ(5) Guide to Preparing Product Kits newinv(1)
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy