![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find whether a file is local or remote file? | jackfds | UNIX for Dummies Questions & Answers | 3 | 07-10-2007 08:36 AM |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 06:35 AM |
| Transfer file from local unix server to remote server | indira | HP-UX | 2 | 05-02-2007 05:15 PM |
| FTP multiple files from remote server to local server | berlin_germany | Shell Programming and Scripting | 2 | 12-20-2006 03:24 AM |
| executing a remote location script from local server | srivsn | Shell Programming and Scripting | 2 | 02-28-2006 03:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Find match in two diff file - local srv and remote server
Perl Guru
.
I need to compare two diff file (file1.abc will locate in current server and file2.abc will locate in remote server), basically the script will look for match in both file and only will send out email if there is no match and also give me list of unmatch and dups as well. So here is the logic how the script will work. The script will reside in Server1. Server 1 has 13 different files like: file1.abc ..>compare with remote server (server 2) file2.abc file1.bcd ..>compare with remote server (server 3) file2.abc file1.dfg ..>compare with remote server (server 4) file2.abc file1.ghi ..>compare with remote server (server 5) file2.abc file1.ijk ..>compare with remote server (server 6) file2.abc file1.klm ..>compare with remote server (server 7) file2.abc file1.mno ..>compare with remote server (server 8) file2.abc file1.opq ..>compare with remote server (server 9) file2.abc file1.qrs ..>compare with remote server (server 10) file2.abc file1.stu ..>compare with remote server (server 11) file2.abc file1.uvw ..>compare with remote server (server 12) file2.abc file1.wxy ..>compare with remote server (server 13) file2.abc file1.yza ..>compare with remote server (server 14) file2.abc (The file names before extension are the same in Server1, but all filename are same in remote servers) Now I need to compare file1.abc with remote server (Server 2) filename (file2.abc) (/xxx/xyx/mns/file2.abc). The script need to compare only with component name In this example sunsoloaris, hpunix, linux. All of the file has same format in both file types. Format is like the following: file1.abc format: Fsdfsdf kkldfsd Component sunsolaris Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Fsdfsdf kkldfsd Component hpunix Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Fsdfsdf kkldfsd Component linux Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Following is file2.abc (Remote server server 2) Fsdfsdf kkldfsd Component sunsolaris Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Fsdfsdf kkldfsd Component winxp Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Fsdfsdf kkldfsd Component hpunix Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Fsdfsdf kkldfsd Component winxp Sdfsdfs dfdsfds Sdfsdf sdfsdf Sdfsdf ertyertre Sdfsdf hfdghdfgd Output will be in an email: (If exact match of Component found dont send email.) If exact match of Component not found send email. E-mail should indicate: Component linux not found in file2.abc in remote server (server 2) Multiple entries of Component winxp found in file2.abc in remote server (server 2) To get date from remote server login and passwd will be required. Thanks. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|