向后查找:
echo "pt=1234" | grep -Po '(?<=pt=)\d+'
向前查找:
echo "1234pt=" | grep -Po '\d+(?=pt=)'
| p = reinterpret_cast<const unsigned char *>(szKey); | |
| while (*p) { | |
| res = (res << 7) + (res >> 25) + *p++; | |
| } | |
| // 相当于,res这个int32将前面8位移到后面去了, eg. 1101001xxxxxxxxxxxxx,就成了,xxxxxxxxxxxxx110100 |
| /* | |
| 12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
| Copyright (C) 2011 Kevintop | |
| Includes jQuery | |
| Copyright 2011, John Resig | |
| Dual licensed under the MIT or GPL Version 2 licenses. | |
| http://jquery.org/license | |
| Includes 12306.user.js |
向后查找:
echo "pt=1234" | grep -Po '(?<=pt=)\d+'
向前查找:
echo "1234pt=" | grep -Po '\d+(?=pt=)'
我的配置是是针对23的,也不知道到24有多大变化, 所以还是用23好了.
升到24, 好多包的管理方式要变了, 怕不适应.
编译参数:
./configure --prefix=/opt/emacs/ --with-x=no --with-x-toolkit=no --enable-largefile
make -j 8
| /* | |
| File: KeychainItemWrapper.h | |
| Abstract: | |
| Objective-C wrapper for accessing a single keychain item. | |
| Version: 1.2 - ARCified | |
| Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
| Inc. ("Apple") in consideration of your agreement to the following | |
| terms, and your use, installation, modification or redistribution of |
ret = sscanf(p,"%*s %1024s",request);
if(ret!=1){
...
}p是"GET /index.html", 这行代码的意思是说直接取"/index.html", 跳过前面的"GET ".
这种用法, 避免定义一个哑变量.
emacs自带的:
高亮匹配的字符串:M-s h p
高亮匹配字符串所在的行:M-s h l
取消高亮: M-s h u
也可以用highlight-symbol.el这个扩展。
--
smth emacs版
cat http2kfc.20121008 | grep tbskip |head -n 1000000 |
perl -MURI -MList::Util -nale '$uri = new URI ("/bin/search?" . $F[-1]);
%h = $uri->query_form; $fat= List::Util::reduce { $a . "_". $b } (keys %h);
print $fat;' | sort | uniq -c