03-23-2013
Pull out multiple lines with grep patternfile
Hi,
I'm trying to get lines from a file using identifiers in the first two columns. I have used:
cat MasterFile.txt | grep -f Pattern.txt
and the lines I want display on screen. If I try to put them in a file the file is created but stays empty:
cat MasterFile.txt | grep -f Pattern.txt > output.txt
Also: If I use the whole pattern file (tested with 12 top lines from my pattern file to start) it doesn't even display on screen.....
Any ideas how I can do this? Very frustrating that the process seems to work but then hit the brick wall!!!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I 'm trying to grep 2 fieldds on 2 differnt lines. Like this:
psit > file
egrep -e '(NS|ES)' $file. Not working. If this succeeds then run next cmd else exit. Pls Help
Gundu (13 Replies)
Discussion started by: gundu
13 Replies
2. Shell Programming and Scripting
Hey guys:
I've been meaning to post this question for awhile...it is regarding grep. Let's say for example that the following entry is in logxx:
Wed Feb 2 07:44:11 <vsm> 91030 Line 5 Severity 1 Vps 6
Call Answered - DN:8753101 CLID:5164665761 PI:83
If I do a grep 91030... (27 Replies)
Discussion started by: cdunavent
27 Replies
3. Shell Programming and Scripting
Hi.
I have this format on a textfile:
VG Name /dev/vg00
PV Name /dev/dsk/c16t0d0
PV Name /dev/dsk/c18t0d0
PV Name /dev/dsk/c16t4d0
VG Name /dev/vg01
PV Name ... (6 Replies)
Discussion started by: jOOc
6 Replies
4. Shell Programming and Scripting
Guys I am having a problem with being able to find missing monitors in a configuration check script I am trying to create for accountability purposes for managing a large number of systems. What I am trying to do is run a script that will look at the raw config data in a file and pull all the pool... (7 Replies)
Discussion started by: scottzx7rr
7 Replies
5. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies
6. UNIX for Dummies Questions & Answers
hi
i have kind of below text in a file.
I want to get a complete paragraph starting with START and ending with before another START) which has a particular string say XYZ or ABC
START XYZ hshjghkjh 45 ljkfd
fldjlj d jldf
START 3493u ABC 454
4545454
4545454 45454
4545454
START ...... (3 Replies)
Discussion started by: reldb
3 Replies
7. UNIX for Advanced & Expert Users
How do you grep 'select * from table_name' string from a script if the select * and from table_name are on 2 different lines ? like
select *
from table_name
Any help would be greatly appreciated !!!
Thanks
RDR (4 Replies)
Discussion started by: RDR
4 Replies
8. UNIX for Dummies Questions & Answers
I have 1300 files (SearchFiles0001.txt, SearchFiles0002.txt, etc.) , each with 650,000 lines, tab-delimited data.
I have a pattern file, with about 1000 lines with a single word. Each single word is found in the 1300 files once.
If I grep -f PatternFile.txt SearchFiles*.txt >OutputFile.txt... (2 Replies)
Discussion started by: newhavendweeb
2 Replies
9. UNIX for Dummies Questions & Answers
I want to grep multiple lines from a text file. I want to grep all lines containing X,Y and NA in a single command. How do I go about doing that?
This is what my text files look like:
rs1983866 0.0983 10 100016313
rs1983865 0.5994 X 100016339
rs1983864 0.3272 11 100017453
rs7077266... (2 Replies)
Discussion started by: evelibertine
2 Replies
10. Shell Programming and Scripting
Hi Everyone,
Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep".
grep 'M053' test.csv > test053.csv
Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Discussion started by: TheStruggle
6 Replies
LEARN ABOUT DEBIAN
grcompiler
grcompiler(1) grcompiler(1)
NAME
grcompiler - Compile GDL into a TrueType Font
SYNOPSIS
grcompiler [-d] [-D] [-g] [-n number] [-v number] [-w number] [-wall] [-q] gdl-file font-file [output-file] [output-fontname]
Description
Grcompiler compiles a Graphite Description Language description of the smarts for a font along with a TrueType Font to create a graphite
font with graphite tables in it.
-d Generate XML debugger file.
-D Generate all debugger files.
-g Permit and ignore invalid glyph definitions.
-nnumber
Set name table start location.
-q Quiet mode (no messages except on error).
-vnumber
Set Silf table version number.
-wnnnn Ignore warning with the given number. This option may be repeated.
-wall Display all warnings.
Environment
grcompiler makes use of the following environment variables
GDLPP Specifies the command to execute to run the GDL preprocessor
Files
gdlerr.txt
Warnings and errors are output to this file.
dbg_classes.txt
Debug file that specifies the classes stored in the font in terms of their GDL source and containing glyph ids in hex.
dbg_cmap.txt
Debug file giving Unicode to glyph mapping of all the glyphs in the font and vice versa.
dbg_enginecode.txt
Debug file containing the action code and constraint code associated with each pass and rule in a pass.
dbg_fsm.txt
Debug file that gives the finite state machines of each pass and the rules referenced. For each pass, a mapping is given between
glyph and column number.
dbg_glyphattrs.txt
Debug file containing all the glyph attributes and their names, along with values specified for each glyph.
dbg_parsetree.txt
Debug file giving the complete parse tree of the GDL source file.
dbg_ruleprec.txt
Debug file that lists the rules in precedence order (order in which they will be tested) for each pass.
$_temp.gdl
Debug file containing the output of gdlpp
Author
Martin Hosken <mhosken@users.sourceforge.net>
$Date: 2012-05-29 11:36:50 $ grcompiler(1)