perldoc -f grep Essentially you would need to open each file, read each line and grab the name somehow (regex, split, etc.). Then store the name to an array for the file (consider hash of arrays with key being the filename and the value the array of names for that file). Then store the name to a mega list of all names, making sure not to include duplicates (this is where grep comes in the first time). Then you step through your unique list and foreach your hash of arrays checking for the name in each one (grep again), if they all succeed then your name is in all the files.
I bet there is a better way using hashes and storing the names that way, but the above is definitely a quick and dirty way to one off it. http://danconia.org ------------------------------------------------ On 13 Nov 2002 16:27:09 +0100, Diego Riano <[EMAIL PROTECTED]> wrote: > Hello folks > > I want to ask for your help about the following thing: > > I have several files, like this one: > > Katrin 12334 lsksol 094059 > Karen 29383 skdjsk 092831 > Paul 21928 lskdiw 029384 > > I want to compare all the files to know which names are in all of them. > > could you give some hints? > > Thanks in advance > -- > _______________________________________ > Diego Mauricio Riano Pachon > Biologist > Institute of Biology and Biochemistry > Potsdam University > Karl-Liebknecht-Str. 24-25 > Haus 20 > 14476 Golm > Germany > Tel:0331/977-2809 > http://bioinf.ibun.unal.edu.co/~gotem > http://www.geocities.com/dmrp.geo/ > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]