How to find union of two files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find union of two files
# 8  
Old 12-07-2005
Thanks pixelbeat!
That's what I was looking for. The "-u" option for uniq.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find command to find a word from list of files

I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation. When I tried like below, -bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation -bash-4.1$ find ./ -name % Retail by State find: paths must precede expression: Retail Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

2. Programming

Event driven programming / epoll / typedef union / session data array

Sorry for the “word salad” subject, but I wanted to cast a wide net for help. I've created an IP (Internet Protocol) server which serves HTTP, SMTP, and FTP requests. As you probably know, they all require creating a socket, listening on it, accepting connections, and then having a short... (3 Replies)
Discussion started by: John S.
3 Replies

3. Programming

GDB and GCC union

My concept may sound a bit cryptic but I what some startup information as to how we can use GDB APIs / debugging techniques in programs with GCC when we compile the program. We can definitely tell gcc to link GDB libs also. The ultimate aid would be that when the compiled programs executes it... (4 Replies)
Discussion started by: uunniixx
4 Replies

4. Web Development

Intersection and union of array by hash

Hi, A piece of script from Perl-cookbook I do not understand, and post here for explanation. The purpose is to find the element in either array (union), and in both array (intersection). Thank you in advance. @a=qw(1 3 5 6 7 8); @b=qw(2 3 5 7 9); foreach $e (@a, @b) {$union{$e}++ &&... (3 Replies)
Discussion started by: yifangt
3 Replies

5. Shell Programming and Scripting

awk: union regions

Hi all, I have difficulty to solve the followign problem. mydata: StartPoint EndPoint 22 55 2222 2230 33 66 44 58 222 240 11 25 22 60 33 45 The union of above... (2 Replies)
Discussion started by: phoeberunner
2 Replies

6. Shell Programming and Scripting

Text files union

How can i union two files that each of them contain text to one new file in unix shell scripting or in awk scripting language? (2 Replies)
Discussion started by: tal
2 Replies

7. Shell Programming and Scripting

union of two files

Given two files of the same format (For example number1|text1|number2) what is the command to print lines in file1 which do not occur in file2? diff command seems a bit complicated for me for this purpose. Please help!! Thank you very much. (3 Replies)
Discussion started by: sherkaner
3 Replies

8. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

9. Shell Programming and Scripting

Find files older than 20 days & not use find

I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in. How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies
Login or Register to Ask a Question
BIND(2) 							System Calls Manual							   BIND(2)

NAME
bind, mount, unmount - change name space SYNOPSIS
#include <u.h> #include <libc.h> int bind(char *name, char *old, int flag) int mount(int fd, char *old, int flag, char *aname) int unmount(char *name, char *old) DESCRIPTION
Bind and mount modify the file name space of the current process and other processes in its name space group (see fork(2)). For both calls, old is the name of an existing file or directory in the current name space where the modification is to be made. The name old is evaluated as described in intro(2), except that no translation of the final path element is done. For bind, name is the name of another (or possibly the same) existing file or directory in the current name space. After a successful bind call, the file name old is an alias for the object originally named by name; if the modification doesn't hide it, name will also still refer to its original file. The evaluation of new happens at the time of the bind, not when the binding is later used. The fd argument to mount is a file descriptor of an open network connection or pipe to a file server. The old file must be a directory. After a successful mount the file tree served (see below) by fd will be visible with its root directory having name old. The flag controls details of the modification made to the name space. In the following, new refers to the file as defined by name or the root directory served by fd. Either both old and new files must be directories, or both must not be directories. Flag can be one of: MREPL Replace the old file by the new one. Henceforth, an evaluation of old will be translated to the new file. If they are directories (for mount, this condition is true by definition), old becomes a union directory consisting of one directory (the new file). MBEFORE Both the old and new files must be directories. Add the constituent files of the new directory to the union directory at old so its contents appear first in the union. After an MBEFORE bind or mount, the new directory will be searched first when evaluating file names in the union directory. MAFTER Like MBEFORE but the new directory goes at the end of the union. The flags are defined in <libc.h>. In addition, there is an MCREATE flag that can be OR'd with any of the above. When a create system call (see open(2)) attempts to create in a union directory, and the file does not exist, the elements of the union are searched in order until one is found with MCREATE set. The file is created in that directory; if that attempt fails, the create fails. With mount, the file descriptor fd must be open for reading and writing and prepared to respond to 9P messages (see Section 5). After the mount, the file tree starting at old is served by a kernel mnt(3) device. That device will turn operations in the tree into messages on fd. Aname selects among different file trees on the server; the null string chooses the default tree. The file descriptor fd is automatically closed by a successful mount call. The effects of bind and mount can be undone by unmount. If name is zero, everything bound to or mounted upon old is unbound or unmounted. If name is not zero, it is evaluated as described above for bind, and the effect of binding or mounting that particular result on old is undone. SOURCE
/sys/src/libc/9syscall SEE ALSO
bind(1), intro(2), fcall(2), auth(2) (particularly amount), intro(5), mnt(3), srv(3) DIAGNOSTICS
The return value is a positive integer (a unique sequence number) for success, -1 for failure. These routines set errstr. BUGS
Mount will not return until it has successfully attached to the file server, so the process doing a mount cannot be the one serving. BIND(2)