今天一个大神问我公司ral版本号是哪个,瞬间懵逼,我tm哪儿知道哇,于是get到了一下命令
[rd@localhost php]$ strings ./lib/php/extensions/no-debug-non-zts-20060613/ral.so |grep -P “\d+\.\d+\.\d+\.\d+”
2.0.13.8
RAL 2.0.13.8 didn’t support convert overwrite at runtime, service=%s
RAL 2.0.13.8 didn’t support protocol overwrite at runtime, service=%s
RAL/2.0.13.8 (internal request)
1.0.0.0
127.0.0.1
0.0.0.1
127.0.0.1
127.0.0.1;192.168.1.*
255.255.255.255
1.2.1.2
1.2.0.4
get到了grep 加 -P时可以用prel风格的正则
-P, –perl-regexp PATTERN is a Perl regular expression
另外,strings的用法之前没用过,其实strings跟cat没啥区别,只不过cat只能是查看普通文本,strings可以查看二进制的文本甚至更多。
strings: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex