Sponsored Content
Top Forums Shell Programming and Scripting Get common lines from multiple files Post 302437877 by genehunter on Friday 16th of July 2010 11:33:46 AM
Old 07-16-2010
Dear Radoulov,
That worked perfectly well.. exactly as I wanted!
I would like to know if this script is extensible for say a hundred such files?
Also if the files are names differently; not file[a-d], how will the code change.
Could you also give a brief explanation if time permits.
Sincere thanks
~GH
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To find all common lines from 'n' no. of files

Hi, I have one situation. I have some 6-7 no. of files in one directory & I have to extract all the lines which exist in all these files. means I need to extract all common lines from all these files & put them in a separate file. Please help. I know it could be done with the help of... (11 Replies)
Discussion started by: The Observer
11 Replies

2. Shell Programming and Scripting

Common lines from files

Hello guys, I need a script to get the common lines from two files with a criteria that if the first two columns match then I keep the maximum value of the 3rd column.(tab separated columns) Sample input: file1: 111 222 0.1 333 444 0.5 555 666 0.4 file 2: 111 222 0.7 555 666... (5 Replies)
Discussion started by: jaysean
5 Replies

3. Shell Programming and Scripting

Common lines from files

Hello guys, I need a script to get the common lines from two files with a criteria that if the first two columns match then I keep the maximum value of the 5th column.(tab separated columns) . 3rd and 4th columns corresponds to the row which has highest value for the 5th column. Sample... (2 Replies)
Discussion started by: jaysean
2 Replies

4. Shell Programming and Scripting

Merge multiple lines in same file with common key using awk

I've been a Unix admin for nearly 30 years and never learned AWK. I've seen several similar posts here, but haven't been able to adapt the answers to my situation. AWK is so damn cryptic! ;) I have a single file with ~900 lines (CSV list). Each line starts with an ID, but with different stuff... (6 Replies)
Discussion started by: protosd
6 Replies

5. Shell Programming and Scripting

Find common lines between multiple files

Hello everyone A few years Ago the user radoulov posted a fancy solution for a problem, which was about finding common lines (gene variation names) between multiple samples (files). The code was: awk 'END { for (R in rec) { n = split(rec, t, "/") if (n > 1) dup = dup ?... (5 Replies)
Discussion started by: bibb
5 Replies

6. Shell Programming and Scripting

Compare multiple files, and extract items that are common to ALL files only

I have this code awk 'NR==FNR{a=$1;next} a' file1 file2 which does what I need it to do, but for only two files. I want to make it so that I can have multiple files (for example 30) and the code will return only the items that are in every single one of those files and ignore the ones... (7 Replies)
Discussion started by: castrojc
7 Replies

7. UNIX for Dummies Questions & Answers

Filter lines common in two files

Thanks everyone. I got that problem solved. I require one more help here. (Yes, UNIX definitely seems to be fun and useful, and I WILL eventually learn it for myself. But I am now on a different project and don't really have time to go through all the basics. So, I will really appreciate some... (6 Replies)
Discussion started by: latsyrc
6 Replies

8. Shell Programming and Scripting

Join common patterns in multiple lines into one line

Hi I have a file like 1 2 1 2 3 1 5 6 11 12 10 2 7 5 17 12 I would like to have an output as 1 2 3 5 6 10 7 11 12 17 any help would be highly appreciated Thanks (4 Replies)
Discussion started by: Harrisham
4 Replies

9. Shell Programming and Scripting

Join columns across multiple lines in a Text based on common column using BASH

Hello, I have a file with 2 columns ( tableName , ColumnName) delimited by a Pipe like below . File is sorted by ColumnName. Table1|Column1 Table2|Column1 Table5|Column1 Table3|Column2 Table2|Column2 Table4|Column3 Table2|Column3 Table2|Column4 Table5|Column4 Table2|Column5 From... (6 Replies)
Discussion started by: nv186000
6 Replies

10. Shell Programming and Scripting

Find common lines between all of the files in one folder

Could it be possible to find common lines between all of the files in one folder? Just like comm -12 . So all of the files two at a time. I would like all of the outcomes to be written to a different files, and the file names could be simply numbers - 1 , 2 , 3 etc. All of the file names contain... (19 Replies)
Discussion started by: Eve
19 Replies
VUSB-ANALYZER(1)					       Virtual USB Analyzer						  VUSB-ANALYZER(1)

NAME
vusb-analyzer - tool for visualizing logs of USB packets SYNOPSIS
vusb-analyzer [OPTIONS] LOGFILE [LOGFILE...] DESCRIPTION
The Virtual USB Analyzer is tool for visualizing logs of USB packets, from hardware or software USB sniffer tools. It's the world's first tool to provide a graphical visualization along with raw hex dumps and high-level protocol analysis. The Virtual USB Analyzer is not itself a USB sniffer tool. It is just a user interface for visualizing logs. It currently supports two log formats, but it's designed to be easily extensible. With a couple hundred lines of Python code, you can add support for your favorite log format. The Virtual USB Analyzer was developed at VMware as an efficient way to debug their own USB virtualization stack. They wanted a tool that made it easy to see problems at a glance, and they wanted a way to solve both correctness and performance bugs. As a result, they ended up with what they think is a fairly unique tool. They're excited to have the opportunity to release this tool as open source software. Supported Log Formats * Logged USB traffic from debug builds of VMware Fusion, Workstation, or Player. See the tutorial for information on capturing such a log. * XML logs from the Ellisys USB Explorer 200, a hardware USB 2.0 analyzer. Features * Unique graphical timeline view. * Side-by-side diff mode: visually compare two log files. * Pluggable log format modules: VMware, Ellisys. * Pluggable protocol decoders: USB Chapter 9, Bluetooth, Storage, Cypress FX2. * Packet metrics and filtering tools. * Whole-bus analysis: analyze multiple devices concurrently. * Written in Python, with a GTK+ user interface. * Automatic "tail -f" mode: follow log files as they grow. * Loads large log files in the background. You can start browsing before the whole file is loaded into memory. * Automatic decompression of gzipped log files. OPTIONS
-t Tail mode, start from the end of a growing log file. HOMEPAGE
More information about vusb-analyzer, including a tutorial and sample logs, can be found at <http://vusb-analyzer.sourceforge.net/>. AUTHOR
vusb-analyzer Micah Dowty <micah@vmware.com>. This manual page was written by Daniel Baumann <daniel@debian.org>, for the Debian project (but may be used by others). 1.0 2009-05-17 VUSB-ANALYZER(1)
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy