Sponsored Content
Top Forums Shell Programming and Scripting Get the missing dependency from two files Post 302873363 by yanglei_fage on Tuesday 12th of November 2013 04:39:24 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy