
字符串 正则表达式
清钟沁桐
for study
展开
-
shell 脚本中实现字符串大小写不敏感的比较方法
方法一: 你可以将两个字符串统统转成大写(或小写), 再比较 #!/bin/bash xxx= "Temp " yyy= "temp " x_tmp=$(echo $xxx | tr [a-z] [A-Z]) y_tmp=$(echo $yyy | tr [a-z] [A-Z]) if [ "$x_tmp " =原创 2011-11-10 13:06:27 · 18944 阅读 · 1 评论 -
ctrl-c,ctrl-z,ctrl-d区别
linux下: ctrl-c 发送 SIGINT 信号给前台进程组中的所有进程。常用于终止正在运行的程序。 ctrl-z 发送 SIGTSTP 信号给前台进程组中的所有进程,常用于挂起一个进程。 ctrl-d 不是发送信号,而是表示一个特殊的二进制值,表示 EOF。 ctrl-/ 发送 SIGQUIT 信号给前台进程组中的所有进程,终止前台进程并生成 core 文件。 Key Fun转载 2011-12-26 23:25:37 · 5694 阅读 · 0 评论 -
将windows风格路径(\\或\)调整为linux风格路径(/)
#include #include #include using namespace std; #define ALPHABET_NUM 256 typedef enum { ENUM_PATH, ENUM_DATA } enumtype; char fsm[9][ALPHABET_NUM]; void initfsm() { memset(fsm[0],0,原创 2012-09-09 22:35:43 · 2656 阅读 · 0 评论 -
获取指定代码片段中各类汇编指令个数 getInsnNumbers.sh
tmpfile=$1 echo $tmpfile #grep "\[\ 0x[0-9a-f]*\ 0x[0-9a-f]*\ [0-9]\ \]" $tmpfile | grep "\"[a-z][0-9a-z,. ]*\"" -c # cat $tmpfile | awk -F: '{OFS=":"; $1=""; print $0}' | awk '{$1=""; print $0}' >原创 2014-07-18 17:59:31 · 1204 阅读 · 3 评论 -
二进制一致性确认分析
def CheckCC1(): global g_sourcc1 global g_destcc1 global g_sourgcc global g_destgcc global g_sourcc1plus global g_destcc1plus global g_sourcpp global g_destcpp if ((g_sourcc1 != None转载 2015-12-02 13:06:37 · 8956 阅读 · 0 评论