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.