![]() |
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 |
| rm core files and pattern matching | littleIdiot | UNIX for Dummies Questions & Answers | 3 | 10-15-2008 10:45 AM |
| Matching and combining two files | sickboy | Shell Programming and Scripting | 3 | 07-17-2008 12:20 PM |
| shell script for matching 2 files | gholdbhurg | Shell Programming and Scripting | 8 | 06-23-2008 07:33 AM |
| Matching and combining two files | p3t3r | Shell Programming and Scripting | 5 | 05-20-2008 10:16 AM |
| Find matching lines between 2 files | jojojmac5 | UNIX for Dummies Questions & Answers | 5 | 01-18-2007 01:06 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I am using solaris, need either awk/shell or perl script to compate two files.
both of these file1 and file2 are located in two diffent location path in the same server. file1 location: /export/db/mna file2: /etc/dba The script will compare in file1 first field (e.g. abc00asp)before colon: and will look for match in file2 second field (e.g. abc00asp) File1 format: abc00asp:11.83.0.1 def01asp:11.83.0.2 efg00asy:11.83.0.5 rkl01atm:11.83.0.6 ppr00rsm:11.83.0.7 trt00nsm:11.83.0.8 File2 Format: 172.25.0.97 abc00asp abc00asp.atl.mnn.net 172.25.0.97 ppr00rsm ppr00rsm.atl.mnn.net 172.25.0.97 bppr00rsm pr00rsm.atl.mnn.net 172.25.0.97 ypr00rsm ppr00rsm.atl.mnn.net 172.25.0.97 ppr00rsm ppr00rsm.atl.mnn.net 172.25.0.97 trt00nsm trt00nsm.atl.mnn.net The outfile will indicate match files: abc00asp ppr00rsm trt00nsm Thank you. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|