Sponsored Content
Full Discussion: Grep Question
Top Forums UNIX for Dummies Questions & Answers Grep Question Post 302085586 by vgersh99 on Friday 18th of August 2006 09:40:50 AM
Old 08-18-2006
Quote:
Originally Posted by slayer666
for question three u can use this

cat yyyymmdd.log | wc -l > <filename>
and why exactly do you need a 'cat' here?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep question

what is the format for grep if I want to search from the current directory and through all its subdirectories?:) (3 Replies)
Discussion started by: pkappaz
3 Replies

2. UNIX for Dummies Questions & Answers

question about grep

I want to search for a word from the root directory using grep command. I am searching for a word called batch in cd /vol directory.The vol directory has so many sub-directories and I want to see all the files having the name as batch. This what I tried .. /vol/ % grep -i *batch* But it is... (4 Replies)
Discussion started by: ANAMIKA56
4 Replies

3. Shell Programming and Scripting

grep question

hello people, All my servers have 4 mounts with this norme. For example, if my hostname is siroe. df -h | grep `hostname` /dev/dsk/c1t3d0s6 404G 399G 800M 100% /siroe3 /dev/dsk/c1t2d0s6 404G 399G 800M 100% /siroe2 /dev/md/dsk/d6 20G 812M 19G ... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

4. UNIX for Dummies Questions & Answers

grep question

Instead of using the following command #dmesg | grep -v sendmail | grep -v xntpd How can I use just one grep -v and give both arguments. Please suggest thanks (4 Replies)
Discussion started by: Tirmazi
4 Replies

5. Shell Programming and Scripting

grep question

Hello, Is there a way in grep to remember patterns? For eg: int a,b,c,d,a; If a variable is declared twice, like in the previous example, I should be able to print only those lines. Is there a way to print only the lines where the variable name occurs more than once, using grep... (1 Reply)
Discussion started by: prasanna1157
1 Replies

6. Shell Programming and Scripting

grep question please

i have files with "DOMAINSOLVER ACMS" with any number of spaces in between the two words on its own line and i can find it with the following: grep -c "DOMAINSOLVER* ACMS" $FILENAMEbut i need to exclude any lines matching: "$DOMAINSOLVER". i've tried a variety of quoting and escaping with no luck.... (4 Replies)
Discussion started by: crimso
4 Replies

7. Shell Programming and Scripting

Question about grep

can anyone tell me what the \/$ means? from grep \/$ (8 Replies)
Discussion started by: Nick1097
8 Replies

8. Shell Programming and Scripting

Question about grep

is there anyway i can ask grep to only get the first line? as in the top command line line 1 <-- just grep this line line 2 line 3 ---------- Post updated at 04:24 PM ---------- Previous update was at 04:19 PM ---------- nvm.. found out that i can do it with |head (12 Replies)
Discussion started by: Nick1097
12 Replies

9. UNIX for Dummies Questions & Answers

Question on grep

Hello all, I'm trying to grep the string "scott" from all files whose names are like srvr*.log and that were created "Nov 15"...I'm trying the following command but throws an error message...seems like the syntax is incorrect.. grep scott < ls -l srvr*.log|grep "Nov 15" Thanks for your... (9 Replies)
Discussion started by: luft
9 Replies

10. UNIX for Dummies Questions & Answers

Grep Question

My grep returns a row of data like this: 75=20130130;60=074338;61=985;511=55473883;452=115439;62=196;267=1; Is there a way for the grep to only return 60="something" and 511="something" ? Thanks in advance. (10 Replies)
Discussion started by: Carl2013
10 Replies
POSTFIX2DLF_PRE.IN(1)					  LogReport's Lire Documentation				     POSTFIX2DLF_PRE.IN(1)

NAME
postfix2dlf_pre - preprocess postfix logfiles for postfix2dlf_main SYNOPSIS
postfix2dlf_pre dumpfile DESCRIPTION
postfix2dlf_pre expect a postfix logfile on STDIN. It prints preprocessed logfile lines to STDOUT and creates a Berkeley DB holding a mapping from hostname-queueid to number-of-lines-with-this-id. dumpfile can be e.g. /tmp/dump, ../../var/dump or dump. DEVELOPERS
One can use the lr_anondump tool to view the contents of the dumpfile. E.g. run $ zcat postfix.log.gz | ./postfix2dlf_pre /tmp/stem > /tmp/pre $ lr_anondump /tmp/stem $ ./postfix2dlf_main /tmp/stem < /tmp/pre > /tmp/post . EXAMPLE
The raw log file Dec 1 04:02:56 internetsrv postfix/pickup[20919]: 693A3578E: uid=0 from=<root> Dec 1 04:02:56 internetsrv postfix/cleanup[20921]: 693A3578E: message-id=<john.doe.1@example.com> Dec 1 04:02:57 internetsrv postfix/qmgr[20164]: 693A3578E: from=<john.doe.2@example.com>, size=617 (queue active) Dec 1 04:02:58 internetsrv postfix/local[20924]: 693A3578E: to=<john.doe.2@example.com>, relay=local, delay=3, status=sent (forwarded as E325C578D) will get converted to dlfid internetsrv693A3578E from_relay_host localhost from_relay_ip 127.0.0.1 logrelay internetsrv queueid 693A3578E time 1007175776 type pickup dlfid internetsrv693A3578E logrelay internetsrv msgid <john.doe.1@example.com> queueid 693A3578E time 1007175776 type cleanup dlfid internetsrv693A3578E from_domain example.com from_relay_host localhost from_relay_ip 127.0.0.1 from_user john.doe.2 logrelay internetsrv queueid 693A3578E size 617 time 1007175777 type qmgr delay 3 dlfid internetsrv693A3578E logrelay internetsrv queueid 693A3578E stat sent time 1007175778 to_domain example.com to_relay_host localhost to_relay_ip 127.0.0.1 to_user john.doe.2 type local xstat (forwarded_as_e325c578d) EXAMPLES
postfix2dlf_pre will be rarely used on its own: it is called by postfix2dlf(1). Refer to the postfix2dlf manpage for examples and usage information. SEE ALSO
postfix2dlf(1), postfix2dlf_main(1), sendmail2dlf(1), qmail2dlf(1), exim2dlf(1) VERSION
$Id: postfix2dlf_pre.in,v 1.13 2006/07/23 13:16:34 vanbaal Exp $ COPYRIGHT
Copyright (C) 2002 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. AUTHOR
Joost van Baal Lire 2.1.1 2006-07-23 POSTFIX2DLF_PRE.IN(1)
All times are GMT -4. The time now is 09:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy