Sponsored Content
Full Discussion: Creating a shortcut
Top Forums Shell Programming and Scripting Creating a shortcut Post 302663349 by Scrutinizer on Thursday 28th of June 2012 03:34:27 AM
Old 06-28-2012
I think you could just specify more files after 2nd.txt
Code:
awk 'NR==FNR{a[$1];next}($1 in a){print}' 1st.txt 2nd.txt 3rd.txt 4th.txt

If the filenames allow you could use wildcards, e.g:
Code:
awk 'NR==FNR{a[$1];next}($1 in a){print}' match_file.txt file*.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating a Shortcut in a User Driectory

Can someone tell me how to create a shortcut within a users home directory to point to another location? P.S- And is shortcut the correct terminology? Thank you! (4 Replies)
Discussion started by: bachagalou
4 Replies

2. UNIX for Dummies Questions & Answers

shortcut in unix?

Sorry, anybody here knows how to make a shortcut in unix? Thanks. Sebastian. (4 Replies)
Discussion started by: seba
4 Replies

3. UNIX for Dummies Questions & Answers

Shortcut to home directory?

Also, Wherever you are exploring files in the UNIX structure you can jusy type "cd". This will take you to your home directory. Hope that helps. Cheers! (4 Replies)
Discussion started by: guest100
4 Replies

4. UNIX for Dummies Questions & Answers

Shortcut

Dear Friends How i make shortcut in Tru64 unix for example make a shortcut for mail , i want to make a shortcut under / root the bath for mail # cd /var/spool/mail Regards, (1 Reply)
Discussion started by: fmmq
1 Replies

5. UNIX for Dummies Questions & Answers

Shortcut thing?

Hey, im new to Linux...totally new. I know there is a way to assign a type of variable or something to a directory, so instead of having to type "cd /var/www" etc, I could just assign a variable to the directory, so I could just do "cd $assignedvar" and it would be there...if you get what I... (0 Replies)
Discussion started by: mo0ness
0 Replies

6. Shell Programming and Scripting

Is there a shortcut in awk?

Is there a key board shortcut in vi editor to allow me to find the next ( or { that are corresponding to the first one? Thanks! It's % sign. (1 Reply)
Discussion started by: whatisthis
1 Replies

7. UNIX for Dummies Questions & Answers

Comparison operators: shortcut name

There are a number of comparison operators used in scripting and programming languages, such as the following: =, ==, ===, !=, =~, <, >, <=, >=, etc Is there a shortcut name for them, such as one has for as being any capital letter? If not, it would mean that I would have to list them all for a... (2 Replies)
Discussion started by: figaro
2 Replies

8. Shell Programming and Scripting

Creating a Shortcut (to just type "l" but it runs "ls -lah")

How do I create shortcuts? For example: I just want to type one key "l" and have it output the command of "ls -lah" I believe it's creating a file called l with 755 permissions but I'm not sure where to put the file. *if it matters, I'm on a shared hosting web server using cPanel with... (2 Replies)
Discussion started by: ijustsawmars
2 Replies

9. UNIX for Dummies Questions & Answers

Shortcut keys are not working

Hi all, I use the shortcut keys CTRL-a and CTRL-e to move cursor to start and end of line in shell prompt alot. But recently what happened to my system i don't know only CTRL-a is working not CTRL-e . If i press CTRL-e any other window in that desktop pop's up. Can any1 tell me how to correct... (2 Replies)
Discussion started by: vio719
2 Replies

10. Solaris

How to create a shortcut for Openoffice?

Hello all, I am facing some problem after installing the Openoffice in Solaris 10. The installation is successful but i cannot find any icon or shortcut on both Application and Desktop... please help me on this.... (8 Replies)
Discussion started by: aungyepaing
8 Replies
dpa(1)							      General Commands Manual							    dpa(1)

NAME
dpa - DNS Packet Analyzer. Analyze DNS packets in ip trace files SYNOPSIS
dpa [ OPTION ] TRACEFILE DESCRIPTION
dpa is used to analyze dns packets in trace files. It has 3 main options: count, filter, and count uniques (i.e. count all different occurences). OPTIONS
-c expressionlist Count occurrences of matching expressions -f expression Filter: only process packets that match the expression -h Show usage -p Show the total number of correct DNS packets, and percentage of -u and -c values (of the total of matching on the -f filter. if no filter is given, percentages are on all correct dns packets) -of file Write all packets that match the -f flag to file, as pcap data. -ofh file Write all packets that match the -f flag to file, in hexadecimal format, readable by drill. -s Show possible match names -s matchname show possible match operators and values for name -sf Only evaluate packets (in representation format) that match the -f filter. If no -f was given, evaluate all correct dns packets. -u matchnamelist Count every occurence of every value of the matchname (for instance, count all packetsizes, see EXAMPLES in ldns-dpa(1) ). -ua For every matchname in -u, show the average value of all matches. Behaviour for match types that do not have an integer value is undefined. -uac For every matchname in -u, show the average number of times this value was encountered. -um number Only show the results from -u for values that occurred more than <number> times. -v level Set verbosity to level (1-5, 5 being the highest). Mostly used for debugging. -notip file Write packets that were not recognized as IP packets to file (as pcap data). -baddns file Write dns packets that were too mangled to parse to file (as pcap data). -version Show version and exit LIST AND MATCHES
A <matchnamelist> is a comma separated list of match names (use -s to see possible match names). A <expressionlist> is a comma separated list of expressions. An expression has the following form: <expr>: (<expr>) <expr> | <expr> <expr> & <expr> <match> <match>: <matchname> <operator> <value> <operator>: = equal to <value> != not equal to <value> > greater than <value> < lesser than <value> >= greater than or equal to <value> <= lesser than or equal to <value> ~= contains <value> See the -s option for possible matchnames, operators and values. EXAMPLES
ldns-dpa -u packetsize -p test.tr Count all different packetsizes in test.tr and show the precentages. ldns-dpa -f "edns=1&qr=0" -of edns.tr test.tr Filter out all edns enable queries in test.tr and put them in edns.tr ldns-dpa -f edns=1 -c tc=1 -u rcode test.tr For all edns packets, count the number of truncated packets and all their rcodes in test.tr. ldns-dpa -c tc=1,qr=0,qr=1,opcode=QUERY test.tr For all packets, count the number of truncated packets, the number of packets with qr=0, the number of packets with qr=1 and the number of queries in test.tr. ldns-dpa -u packetsize -ua test.tr Show all packet sizes and the average packet size per packet. ldns-dpa -u srcaddress -uac test.tr Show all packet source addresses and the average number of packets sent from this address. sudo tcpdump -i eth0 -s 0 -U -w - port 53 | ldns-dpa -f qr=0 -sf Print all query packets seen on the specified interface. AUTHOR
Written by Jelte Jansen for NLnetLabs. REPORTING BUGS
Report bugs to <jelte@nlnetlabs.nl>. COPYRIGHT
Copyright (C) 2005 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. 1 Nov 2005 dpa(1)
All times are GMT -4. The time now is 08:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy