Get the missing dependency from two files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Get the missing dependency from two files
# 1  
Old 11-12-2013
Get the missing dependency from two files

#cat hwlock-full.dep
Code:
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
/bin/sh
rtld(GNU_HASH)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libpciaccess.so.0()(64bit)
libnuma.so.1()(64bit)
libdl.so.2()(64bit)
libxml2.so.2()(64bit)
libhwloc.so.5()(64bit)
libz.so.1()(64bit)
libm.so.6()(64bit)
/bin/sh
libc.so.6(GLIBC_2.3)(64bit)
libxcb-shm.so.0()(64bit)
libXau.so.6()(64bit)
libX11.so.6()(64bit)
libXrender.so.1()(64bit)
libpixman-1.so.0()(64bit)
libXdmcp.so.6()(64bit)
libfontconfig.so.1()(64bit)
libxcb-render.so.0()(64bit)
librt.so.1()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libfreetype.so.6()(64bit)
libtinfo.so.5()(64bit)
libexpat.so.1()(64bit)
libxcb.so.1()(64bit)
libpng12.so.0()(64bit)
libcairo.so.2()(64bit)
libpthread.so.0()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libXext.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libxml2.so.2(LIBXML2_2.6.0)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libnuma.so.1(libnuma_1.2)(64bit)
libnuma.so.1(libnuma_1.1)(64bit)
libxml2.so.2(LIBXML2_2.4.30)(64bit)
libc.so.6(GLIBC_2.7)(64bit)

cat hwlock.dep
Code:
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
rtld(GNU_HASH)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libpciaccess.so.0()(64bit)
libnuma.so.1()(64bit)
libdl.so.2()(64bit)
libxml2.so.2()(64bit)
libhwloc.so.5()(64bit)
libz.so.1()(64bit)
libm.so.6()(64bit)
/bin/sh
libc.so.6(GLIBC_2.3)(64bit)
libXau.so.6()(64bit)
libX11.so.6()(64bit)
libXrender.so.1()(64bit)
libpixman-1.so.0()(64bit)
libXdmcp.so.6()(64bit)
libfontconfig.so.1()(64bit)
libxcb-render.so.0()(64bit)
librt.so.1()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libfreetype.so.6()(64bit)
libtinfo.so.5()(64bit)
libexpat.so.1()(64bit)
libxcb.so.1()(64bit)
libpng12.so.0()(64bit)
libcairo.so.2()(64bit)
libpthread.so.0()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libXext.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libxml2.so.2(LIBXML2_2.6.0)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libnuma.so.1(libnuma_1.2)(64bit)
libnuma.so.1(libnuma_1.1)(64bit)
libxml2.so.2(LIBXML2_2.4.30)(64bit)
libc.so.6(GLIBC_2.7)(64bit)

I want to out put below data to report.dep
Code:
hwlock requires:
------------------------------
  libxcb-render0 = 1.8.1
 libxdmcp6 = 1.1.1
 libpciaccess0 = 0.12.902
 /bin/sh
 libxcb-shm.so.0()(64bit)


-------------------------------

(rules: the output is in hwlock-full.dep but not in hwlock.dep)

Last edited by yanglei_fage; 11-12-2013 at 05:38 AM..
# 2  
Old 11-12-2013
Code:
 awk 'NR==FNR{a[$0]++;next}(!a[$0])' hwlock.dep hwlock-full.dep > report.dep

# 3  
Old 11-12-2013
Quote:
Originally Posted by raj_saini20
Code:
 awk 'NR==FNR{a[$0]++;next}(!a[$0])' hwlock.dep hwlock-full.dep > report.dep

I did a try, this doesn't output all the missing line

---------- Post updated at 12:36 AM ---------- Previous update was at 12:31 AM ----------

Quote:
Originally Posted by yanglei_fage
#cat hwlock-full.dep
Code:
libx11-6 >= 1.4.4
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
/bin/sh
rtld(GNU_HASH)
libhwloc.so.5()(64bit)
libz.so.1()(64bit)
libm.so.6()(64bit)
/usr/bin/expect
libc.so.6(GLIBC_2.7)(64bit)

cat hwlock.dep
Code:
libx11-6 >= 1.4.4
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
/bin/sh
rtld(GNU_HASH)
libz.so.1()(64bit)
libm.so.6()(64bit)
libc.so.6(GLIBC_2.7)(64bit)

I want to out put below data to report.dep
Code:
hwlock requires:
------------------------------
libpciaccess0 >= 0.12.902
libhwloc.so.5()(64bit)
/usr/bin/expect 

-------------------------------

(rules: libpciaccess0 >= 0.12.902 libhwloc.so.5()(64bit) /usr/bin/expect in hwlock-full.dep but not in hwlock.dep)

let me try again I just did a another try

file1
Code:
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
rtld(GNU_HASH)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libpciaccess.so.0()(64bit)
libnuma.so.1()(64bit)
libdl.so.2()(64bit)
libxml2.so.2()(64bit)
libhwloc.so.5()(64bit)
libz.so.1()(64bit)
libm.so.6()(64bit)
/bin/sh
libc.so.6(GLIBC_2.3)(64bit)
libXau.so.6()(64bit)
libX11.so.6()(64bit)
libXrender.so.1()(64bit)
libpixman-1.so.0()(64bit)
libXdmcp.so.6()(64bit)
libfontconfig.so.1()(64bit)
libxcb-render.so.0()(64bit)
librt.so.1()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libfreetype.so.6()(64bit)
libtinfo.so.5()(64bit)
libexpat.so.1()(64bit)
libxcb.so.1()(64bit)
libpng12.so.0()(64bit)
libcairo.so.2()(64bit)
libpthread.so.0()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libXext.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libxml2.so.2(LIBXML2_2.6.0)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libnuma.so.1(libnuma_1.2)(64bit)
libnuma.so.1(libnuma_1.1)(64bit)
libxml2.so.2(LIBXML2_2.4.30)(64bit)
libc.so.6(GLIBC_2.7)(64bit)


file-full
Code:
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
libx11-6 >= 1.4.4
libz1 >= 1.2.7
libtinfo5 >= 5.9
libxcb1 >= 1.8.1
numactl >= 2.0.8+rc4
libpixman-1-0 >= 0.29.2
libxml2 >= 2.7.8
libxext6 >= 1.3.1
libxrender1 >= 0.9.7
libfreetype6 >= 2.4.9
libxcb-render0 >= 1.8.1
libcairo2 >= 1.12.14
libc6 >= 2.15
libxcb-shm0 >= 1.8.1
libxdmcp6 >= 1.1.1
libxau6 >= 1.0.7
libexpat1 >= 2.0.1
libpciaccess0 >= 0.12.902
libpng12-0 >= 1.2.49
libfontconfig1 >= 2.8.0
/bin/sh
rtld(GNU_HASH)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libpciaccess.so.0()(64bit)
libnuma.so.1()(64bit)
libdl.so.2()(64bit)
libxml2.so.2()(64bit)
libhwloc.so.5()(64bit)
libz.so.1()(64bit)
libm.so.6()(64bit)
/bin/sh
libc.so.6(GLIBC_2.3)(64bit)
libxcb-shm.so.0()(64bit)
libXau.so.6()(64bit)
libX11.so.6()(64bit)
libXrender.so.1()(64bit)
libpixman-1.so.0()(64bit)
libXdmcp.so.6()(64bit)
libfontconfig.so.1()(64bit)
libxcb-render.so.0()(64bit)
librt.so.1()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libfreetype.so.6()(64bit)
libtinfo.so.5()(64bit)
libexpat.so.1()(64bit)
libxcb.so.1()(64bit)
libpng12.so.0()(64bit)
libcairo.so.2()(64bit)
libpthread.so.0()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libXext.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libxml2.so.2(LIBXML2_2.6.0)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libnuma.so.1(libnuma_1.2)(64bit)
libnuma.so.1(libnuma_1.1)(64bit)
libxml2.so.2(LIBXML2_2.4.30)(64bit)
libc.so.6(GLIBC_2.7)(64bit)

It doesn't get the right results

---------- Post updated at 02:39 AM ---------- Previous update was at 12:36 AM ----------

Quote:
Originally Posted by raj_saini20
Code:
 awk 'NR==FNR{a[$0]++;next}(!a[$0])' hwlock.dep hwlock-full.dep > report.dep

I changed my file content in the question, it doesn't get the expect results
# 4  
Old 11-12-2013
what is the basis of desire result please explain.
i thought you need the missing lines.
# 5  
Old 11-12-2013
Quote:
Originally Posted by raj_saini20
what is the basis of desire result please explain.
i thought you need the missing lines.
correct, I want get the missing line

Lei
# 6  
Old 11-12-2013
Try

Code:
$ grep -v -f file1 fullfile

# 7  
Old 11-12-2013
Quote:
Originally Posted by Akshay Hegde
Try

Code:
$ grep -v -f file1 fullfile

seems your mothd is not correct sometimes, seems diff can get what I want
eg:
Code:
lyang0@ovpovp-LH-Pass:/buildarea2/lyang0/ovp-test/ldd-logs/tmp$ diff openvswitch-1.10.0-r4.dep openvswitch-1.10.0-r4-full.dep
19a20
> libc.so.6(GLIBC_2.14)(64bit)
24a26
> libssl.so.1.0.0(OPENSSL_1.0.0)(64bit)
31a34
> /usr/bin/python

but your mothed get 
lyang0@ovpovp-LH-Pass:/buildarea2/lyang0/ovp-test/ldd-logs/tmp$ grep -v -f openvswitch-1.10.0-r4.dep openvswitch-1.10.0-r4-full.dep 
libc.so.6(GLIBC_2.14)(64bit)
libssl.so.1.0.0(OPENSSL_1.0.0)(64bit)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to takes the missing files?

Hi all , am using unix aix I have a files in one directory.. my files as in format qqss0607.ddd.. (06 is date 07 is month) how to check the missing dates .... can anyone tell me... (9 Replies)
Discussion started by: Venkatesh1
9 Replies

2. Shell Programming and Scripting

How to takes missing files

Hi Am using unix aix I have a group of files in File1 For ex:- Vi file1 A0405 A0605 A0805 When i tried using awk command am getting an error as No space a=`awk 'NF < 1 {next;} p && p != $1 { for( i = p; i < $1; i++ )print i; } {p = $1 + 1 }' file2` Error message:- + + awk NF <... (7 Replies)
Discussion started by: Venkatesh1
7 Replies

3. Shell Programming and Scripting

How to take the missing files

Hi all , am using unix ksh I have a lots of files in /prb directory in the format as .. .. .. .. MMRR0607.DAT_2012 MMRR0707.DAT_2012 MMRR0907.DAT_2012 MMRR1107.DAT_2012 ... .. MMRR3107.DAT_2012 MMRR0208.DAT_2012 .. I need the output as Missing files are:- MMRR0807.DAT_2012 (note... (4 Replies)
Discussion started by: Venkatesh1
4 Replies

4. Shell Programming and Scripting

Report missing files

Hello I need to check various directories for the existence of files. If a file or more are missing I need to display it: e.g files in a dir: data_file.11032300.Z data_file.11032301.Z data_file.11032302.Z data_file.11032303.Z data_file.11032304.Z data_file.11032305.Z... (11 Replies)
Discussion started by: drbiloukos
11 Replies

5. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

6. Shell Programming and Scripting

echo and then cp the missing files

Hi.... I have two files abc.txt and xyz.txt. I want to echo and copy files from abc.txt to xyz.txt, which are not in xyz but present in abc.txt. Both of these files are in same directory. Please provide code with while or for loop.... :) (3 Replies)
Discussion started by: tushar_tus
3 Replies

7. Shell Programming and Scripting

echo missing files.

Hi.... I have two directories, A and B. Files are rcp`d from A to B, but some of the files are missing. files in A are in sequence from "2008111406796.zteasn.norm.gz" to "2008111407415.zteasn.norm.gz" In B directory 27 files are missing, i want to echo those files which are missing, so that... (1 Reply)
Discussion started by: tushar_tus
1 Replies

8. AIX

how to find missing files

Hi on friday one user from peoplesoft lost his file. mean he don't know he saved it or removed it. but, he need the file and it is most valuable. so i searched the file in the server, i got the some with same name on /peoplesoft/..../print directory. is these two are the same one or... (1 Reply)
Discussion started by: honeym210
1 Replies

9. UNIX for Dummies Questions & Answers

Missing Library Files

Can anyone send me copies via email or allow me to download the following files for Unix 4.0? libmsfs.so libfilsys.so These files were lost due to corruption. All the other library files are fine. I have the files on tape, but without libmsfs.so I am unable to open vrestore. I am open... (5 Replies)
Discussion started by: jays337
5 Replies

10. UNIX for Dummies Questions & Answers

files missing

a few of some live payroll files have been deleted / missing ... i've restored last nites backup ... what could be the possibilities of this strange occurance ... users have menus to work on and use these live files ... we run an aix box with a ksh shell. Where do I start ?? Thanks (4 Replies)
Discussion started by: cubicle^dweller
4 Replies
Login or Register to Ask a Question