![]() |
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 |
| Compare/Diff between directories and subdirectories? | andylee80 | UNIX for Dummies Questions & Answers | 5 | 07-12-2007 09:45 AM |
| Compare directories then move similar ones | tgibson2 | UNIX for Dummies Questions & Answers | 2 | 02-11-2006 07:58 AM |
| Compare 2 directoriesand it's sub directories | anikanch | UNIX for Dummies Questions & Answers | 0 | 10-28-2005 10:24 AM |
| Compare 2 Directories | seongyin | UNIX for Dummies Questions & Answers | 2 | 06-01-2005 12:28 PM |
| compare directories on two servers | MizzGail | Shell Programming and Scripting | 1 | 03-25-2003 01:41 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
HI,
i want to compare one file from one directory to many files in other directory. means in my /DIR/20070930/b/STG* directory i have only one file and in /DIR/20070930/a/STG* directory i have many files. so i want to check the name of that files should be present in other directory or not I have just written this script but i am failing to get the out put. ls -1 /DIR/20070930/b/STG* > file1 ls -1 /DIR/20070930/a/STG* > file2 awk ' { FILENAME=="file1" { arr[$0]++} {FILENAME=="file2" { if($0 in arr) {print $0}}' file1 file2 Any help will be appreciated Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|