Hot to compare 2 libraries using shell script

June 25, 2009 at 08:27:42
Specs: Linux 4
I want to compare the version of two libraries
using my script. how can i write the script

See More: Hot to compare 2 libraries using shell script

Report •


#1
June 25, 2009 at 09:05:32
What kind of libraries are you asking about? I will assume binary files. Use the cmp command and check the exit code. This script tells you if the library files are identical:

#!/bin/bash

# untested
cmp -s /path/to/lib1 /path/to/lib2
if [[ $? == 0 ]]
then
   echo "libraries are equal"
else
   echo "libraries are NOT equal"
fi


Report •
Related Solutions


Ask Question