Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Comparing two files and noting matches Post 10710 by augustinep on Monday 19th of November 2001 07:53:15 PM
Old 11-19-2001
Comparing two files and noting matches

I have two files. One contains names and another file (66 MB, ASCII format) contains details of persons. How do I compare the names in the first file with the second file and write the matches to a third file. I would prefer this to be solved in UNIX or VB.

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looking for a string in files and reporting matches

Can someone please help me figure out what the command syntax I need to use is? Here is what I am wanting to do. I have hundreds of thousands of files I need to look for a specific search string in. These files are spread across multiple subdirectories from one main directory. I would like... (4 Replies)
Discussion started by: btrotter
4 Replies

2. Shell Programming and Scripting

looking for files and modify if size matches

hi there. I'm at SunOS 5.9 At my new job i'm using UNIX, and it's my first time. i'm trying to make a script for: -find files with a name passed to it as parameter -compare results with file size passed as parameter too -when comparison's true --> move file -if not--> make nothing ... (3 Replies)
Discussion started by: viko
3 Replies

3. Shell Programming and Scripting

Joining columns from two files, if the key matches

I am trying to join/paste columns from two files for the rows with matching first field. Any help will be appreciated. Files can not be sorted and may not have all rows in both files. Thanks. File1 aaa 111 bbb 222 ccc 333 File2 aaa sss mmmm ccc kkkk llll ddd xxx yyy Want to... (1 Reply)
Discussion started by: sk_sd
1 Replies

4. Shell Programming and Scripting

If string matches within 2 files, delete one file.

I have a directory with a large # of files and in each file I am looking to match a string in one file with a string in the subsequent n file(s). If there is a match between a string in one file and a string in the next n file(s) then delete the subsequent duplicate file(s). Here is sample input: ... (2 Replies)
Discussion started by: sitney
2 Replies

5. Shell Programming and Scripting

Comparing the matches in two files using awk when both files have their own field separators

I've two files with data like below: file1.txt: AAA,Apples,123 BBB,Bananas,124 CCC,Carrot,125 file2.txt: Store1|AAA|123|11 Store2|BBB|124|23 Store3|CCC|125|57 Store4|DDD|126|38 So,the field separator in file1.txt is a comma and in file2.txt,it is | Now,the output should be... (2 Replies)
Discussion started by: asyed
2 Replies

6. Shell Programming and Scripting

finding matches between multiple files from different directories

Hi all... Can somebody pls help me with this... I have a directory (dir1) which has many subdirectories(vr001,vr002,vr003..) with each subdir containing similar text file(say ras.txt). I have another directory(dir2) which has again got some subdir(vr001c,vr002c,vr003c..) with each subdir... (0 Replies)
Discussion started by: bramya07
0 Replies

7. Shell Programming and Scripting

Merge two columns from two files into one if another column matches

I have two text files that look something like this: A:B:C 123 D:E:F 234 G:H:I 345 J:K:L 123 M:N:O 456 P:Q:R 567 A:B:C 456 D:E:F 567 G:H:I 678 J:K:L 456 M:N:O 789 P:Q:R 890 I want to find the line where the first column matches and then combine the second columns into a single... (8 Replies)
Discussion started by: pbluescript
8 Replies

8. Shell Programming and Scripting

Compare 2 files and print matches and non-matches in separate files

Hi all, I have two files, chap.txt and complex.txt. chap.txt looks like this: a d l m r k complex.txt looks like this: a c d e l m n j a d l p q r c p r m ......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

9. UNIX for Dummies Questions & Answers

Print only '+' or '-' if string matches (two files)

I would like to add two additional conditions to the actual code I have: print '+' if in File2 field 5 is greater than 35 and also field 7 is grater than 90. while read -r line do grep -q "$line" File2.txt && echo "$line +" || echo "$line -" done < File1.txt ' Input file 1: ... (5 Replies)
Discussion started by: bernardo.bello
5 Replies

10. UNIX for Beginners Questions & Answers

Matches columns from two different files in shell script

Hi friends, i want to compare first columns from two different files ,if equal print the file2's second column else print the zero.Please help me... file1: a b c d efile2: a 1 c 20 e 30 desired output: 1 0 20 0 30 Please use CODE tags as required by forum rules! Please post in... (1 Reply)
Discussion started by: bhaskar illa
1 Replies
GVFS-LS(1)							   User Commands							GVFS-LS(1)

NAME
gvfs-ls - List files SYNOPSIS
gvfs-ls [OPTION...] [LOCATION...] DESCRIPTION
gvfs-ls lists information about the given locations. If no location is given, it defaults to the current directory. gvfs-ls is similar to the traditional ls utility, but using gvfs locations instead of local files: for example you can use something like smb://server/resource/file.txt as location. File attributes can be specified with their gvfs name, e.g. standard::icon, or just by namespace, e.g. unix, or by '*' which matches all attributes. Several attributes or groups can be specified, separated by comma. OPTIONS
The following options are understood: -?, --help Prints a short help text and exits. -a, --attributes=ATTRIBUTES The attributes to get, specified as a comma-separated list of gvfs file attribute names. -h, --hidden Show hidden files. -l, --long Use a long listing format. -c, --show-completions=PREFIX Show only filenames starting with PREFIX. -n, --nofollow-symlinks Don't follow symlinks. EXIT STATUS
On success 0 is returned, a non-zero failure code otherwise. SEE ALSO
ls(1), gvfs-info(1) gvfs GVFS-LS(1)
All times are GMT -4. The time now is 06:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy