Find the difference between two server lists


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find the difference between two server lists
# 1  
Old 11-01-2012
Find the difference between two server lists

I just want to find the server names that belong to one list but doesnt belong to another. Just the server names in output.
# 2  
Old 11-01-2012
1>Try searching in the forum for this frequently asked question
2>If not, display your sample file so that a best solution can be provided. If its just a single column of servers, first sort both the files and use comm command.
# 3  
Old 11-01-2012
Both the files cotain just a single column of servers
# 4  
Old 11-01-2012
Ok, if you want to display those in file1 and not in file2 follow the below steps

1>sort both the files using the sort command
2>using comm command on sorted files
Code:
comm -2 -3 file1 file2

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Difference between old and new server using df -BG

We have two servers, new and old using df -BG we have on old server Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.9G 5.9G 1.9G 76% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K ... (1 Reply)
Discussion started by: digioleg54
1 Replies

2. Red Hat

Logs & Lists to Save before httpd restart when web server freezes?

Hello... We keep having a problem with the httpd freezing and users getting time outs. I am not the Sys Admin but since I am the 1st one in, I have to restart the httpd server. Is there a list of items I should collect before I restart in order to help with trouble shooting? I currently... (3 Replies)
Discussion started by: djlerman
3 Replies

3. Shell Programming and Scripting

To find Difference

Hi Friends, I need to find the difference between two files , File_1 contained 4 columns, and File_2 contained 4 columns, I need to find the difference using 1st column, Or need to find the difference using 3st column, (6 Replies)
Discussion started by: Shenbaga.d
6 Replies

4. Shell Programming and Scripting

Find Unmatched name from given lists..

i have two lists, list1 => abc jones oracle smith ssm tty list2 => abc jones lmn smith ssm xyz now i want to print only those names which are present in list2 and want to remove names from list2 which presents in list1. so i want OUTPUT => lmn xyz because "abc jones smith ssm" from list2... (5 Replies)
Discussion started by: Killer420
5 Replies

5. UNIX for Dummies Questions & Answers

Find time difference

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 =============== =================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (23 Replies)
Discussion started by: wnaguib
23 Replies

6. UNIX for Dummies Questions & Answers

command difference - find

Hi, What is the difference between these two? find /some_dir -type f -exec chmod 070 {} \; and chmod 070 `find /some_dir -type f` Thanks (5 Replies)
Discussion started by: lamont
5 Replies

7. Shell Programming and Scripting

Shell Script to Create non-duplicate lists from two lists

File_A contains Strings: a b c d File_B contains Strings: a c z Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below. Resultant... (7 Replies)
Discussion started by: mlv_99
7 Replies

8. UNIX for Dummies Questions & Answers

Find difference in two files

Hola, Tengo un texto texto1.txt con el siguiente contenido: Malaga Cadiz Sevilla Hola Y otro .txt texto2.txt con: Malaga Cadiz Sevilla Cordoba Huelva quiero obtener en otro .txt la diferencia entre estos dos archivos: (14 Replies)
Discussion started by: danietepa
14 Replies

9. UNIX for Dummies Questions & Answers

Mail Server managing block lists

I have been having a problem lately with companies adding my small mail servers IP to their RBL lists with no method of retrieving samples of abuse, and a ridiculously long and convoluted procedure for removal. Example being AT&T who in responce to my request to be delisted told me that my IP was... (0 Replies)
Discussion started by: jeffarbour
0 Replies

10. UNIX for Dummies Questions & Answers

difference weblogic server/webserver/app server

Hi All, I am getting confused with the terms below. All I know is an application can be installed on a server. But I see the following terms used in a company. All of them are installed on same Unix box. Could you please help me out in layman terms as to what these exactly means. (PS: I don't... (1 Reply)
Discussion started by: tostay2003
1 Replies
Login or Register to Ask a Question