Created
June 27, 2016 03:11
-
-
Save mike-zhang/220c8c1cc144763379c6e193e7379cb4 to your computer and use it in GitHub Desktop.
Revisions
-
Mike_Zhang created this gist
Jun 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #! /usr/bin/env python # -*-coding:utf-8 -*- """ compare so files funcs test pass : centos6.4_x64 e-mail : [email protected] """ import os def getFuncNames(iterObj,refList): for line in iterObj: arr = line.strip().split(" ") refList.append(arr[-1]) def getData(cmd,refList): rows = os.popen(cmd).read().split("\n") getFuncNames(rows,refList) mysqlList = [] odbcList = [] getData("nm /usr/local/mysql/lib/libmysqlclient.so.18",mysqlList) getData("nm /usr/lib/libodbc.so.2",odbcList) #set([12,3]) & set([1,3]) result = list(set(mysqlList) & set(odbcList)) for item in result : print item