syn


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting syn
# 1  
Old 02-28-2007
syn

suppose I have data in a log file in the below format


date|time|name|email|address|SSN
date|time|name|email|address|SSN
date|time|name|email|address|SSN


is it possible to create a search engine which takes input as three filters out of which two filters should be optional?

say i give date it should list all entries for todays date...if i give date & time as input it should list all entries on that date and time...
# 2  
Old 02-28-2007
yes.

for starters, try the grep command.
use Perl for a more sophisticated solution.
# 3  
Old 02-28-2007
hmm...

A simple grep wont help...as i told i need three filters(input patterns) out of which two should be optional
# 4  
Old 02-28-2007
You can use something like

egrep 'pattern1|pattern2|pattern3' filename

and if pattern1 is compulsory, go for

grep pattern1 filename | egrep 'pattern2|pattern3'

Last edited by dennis.jacob; 02-28-2007 at 02:55 AM..
# 5  
Old 02-28-2007
You ca even go for Awk, it can give you more control over fields!!
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. IP Networking

Getting Iptables New not syn log message more time

Hi guys, I having Iptables log message. It's coming more time. It's can't handle to linux squid. Firewall -> 192.168.102.2 <iptables> squid -> 192.168.102.2 <transparent proxy (port 3128)> error -> Jul 21 23:58:16 mig New not syn:IN= OUT=eth0 SRC=192.168.102.2 DST=192.168.102.96... (0 Replies)
Discussion started by: pasindu
0 Replies

2. Solaris

TCP SYN timer

Can anybody please tell me how I can figure out on a solaris server how long it would take a TCP SYN request to timeout before it gets a SYN_ACK back? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

3. UNIX for Dummies Questions & Answers

plug in for syn on

I am using vim version 7.1.314.It don't have syn on.Is there any plug in available for syn on or I have to update the version. (2 Replies)
Discussion started by: karthigayan
2 Replies

4. UNIX for Advanced & Expert Users

What is FIN/ACK/SYN

Please tell me details about terms FIN, ACK, SYN, RST; used in TCP based communication. Also tell me any RFC or other document which tell me details about these terms. (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

5. Linux

Security issue with TCP SYN packets on Linux

Hi all, A security scanner has been done on a linux server and have found that The remote host does not discard RCP SYN packets which have the FIN flag set. It tells that I need to request a patch which I haven't found yet. I have Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22... (2 Replies)
Discussion started by: bert.n
2 Replies

6. Programming

Getting an ACK for RAW SYN packet

Hi, I'm trying to create a RAW TCP SYN packet and send it from one Linux machine to another. I know the packet I have created is well formed and is received by the peer. Now what I want is to get an ACK for my SYN. I want the peer's Network protocol stack to send me an ACK for that. I know... (17 Replies)
Discussion started by: zampya
17 Replies
Login or Register to Ask a Question