12-27-2013
fantastic, works , thank you so much !!
Hi Don,
I tested with small samples and everything seems to work, I was wondering about the run-time of the original data.
File1 is 3.5Mb and File2 is 7.9Gb, is the code supposed to run for a long time? It has been 4 hrs, and it hasn't produced any output lines.
Last edited by newbie83; 12-27-2013 at 03:34 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
First post on here hope you can help with something
I have a file with a couple of thousand lines (all lines are one string long, i.e a number
I have another file that is over 1 million lines long
Example entry from file 1
123456
Example from file 2
123456 mjhyuihbn ... (5 Replies)
Discussion started by: nampahc
5 Replies
2. Shell Programming and Scripting
how to grep a file based on another input file
File1
ashu 1 ninetwo hari
qwer 6 givefour jan
fghj 8 noeight mar
vbmi 7 noput feb
--
---
File2
noput
noeight
---
--
Taking the input of grep as File2, a search need to be made in File1 giving File3 as output: (7 Replies)
Discussion started by: er_ashu
7 Replies
3. Shell Programming and Scripting
does any one know how to turn the equivalent of this command:
awk '/2011 John Doe 8344/,0' /tmp/ops.log | egrep -c "received request"
to
something that would use egrep instead of awk?
What the awk command does is, it searches the ops.log file for "2011 John Doe 8344". When it finds it,... (4 Replies)
Discussion started by: SkySmart
4 Replies
4. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
5. Shell Programming and Scripting
I have a file named as ucid.txt
It has multiple rows of "id". I need to search and grep each line of it from a file named as pw_logs.txt and put the results into another file.
Please help ! Thanks. (8 Replies)
Discussion started by: gopikrish81
8 Replies
6. Shell Programming and Scripting
Hi All,
I need to recursively grep several folders for a MAC address and display the results with the date of the file name at the start. Even better would be if the final results were displayed chronologically so the newest file is always at the end. Oldest at the top, regardless of what... (8 Replies)
Discussion started by: quemalr
8 Replies
7. Programming
I have 20 files that look pretty much like this:
0.01 1 3822 4.97379915032e-14 4.96982253992e-09 0
0.01 3822 1 4.97379915032e-14 4.96982253992e-09 0
0.01 2 502 0.00993165137406 993.165137406 0
0.01 502 2 0.00993165137406 993.165137406 0
0.01 4 33 0.00189645523539 189.645523539 0
0.01 33 4... (5 Replies)
Discussion started by: kayak
5 Replies
8. Shell Programming and Scripting
Hello,
I have a file with a large number of words each listed in sequential order one word per line.
I want to search these words in another file which has the structure
Both the files are large, but the words in the sourcefile are all available in the target file.
I tried to grep... (2 Replies)
Discussion started by: gimley
2 Replies
9. UNIX for Dummies Questions & Answers
Name Num_free Num_active Pct_act Max_Used Reuse_cnt Instance_Name
--------------------------------- --------------- ----------- ------- ----------- ----------- ------------------------------
additional network memory 0 ... (2 Replies)
Discussion started by: Rajeshneemkar
2 Replies
10. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
LEARN ABOUT DEBIAN
fiaif-scan
FIAIF-SCAN(8) Administration and Privileged Commands FIAIF-SCAN(8)
NAME
fiaif-scan - print syslog entries in human readable form
SYNOPSIS
fiaif-scan [ -n ] [ -m ]
DESCRIPTION
fiaif-scan reads lines from STDIN and prints to STDOUT, in human readable form, any packets found (standard syslog format is assumed).
Each log message is parsed based on the configuration files at the time fiaf-scan is run. The idea is to enable the user to quickly iden-
tify which zone rule is causing the packet to be logged, and how to change this, if necessary.
OPTIONS
-n Don't do a reverse lookup of IP addresses or ports; display them as numbers. This reduces the number of host lookups and speeds up
scanning.
-m print the MAC address on each line.
EXAMPLE
fiaf-scan -n </var/log/messages
Scan from the current system log and display any packets on the console. Don't look up names for IP addressses or ports; just show
the numbers.
FILES
/etc/fiaif/fiaif.conf
AUTHOR
Anders Fugmann <anders(at)fugmann.net>
BUGS
The program has been tested only with messages from the standard syslog. It may work on lines from ulogd, but this has not been tested.
Bash may not be the fastest parser in the world. Expect this software to be slow. (40 lines per sec on a K6-II/300Mhz without name
lookups).
Please report other bugs to <fiaif@fiaif.net>.
SEE ALSO
fiaif.conf(5), zone.conf(5), iptables(8), syslog(3)
Linux Feb 2003 FIAIF-SCAN(8)