bash 中的正则表达式

Posted on 09月 13, 2006 - Filed Under Linux, bash, shell | Leave a Comment

类似
$ps ax | grep -v grep | grep httpd | tr -s ' ' | cut -d ' ' -f1
的方法来取得pid确实还挺好用的,不过今天要取得这个程序执行了多长时间,这个就麻烦了,因为时间中间有空格
翻了半天的man还是没好的解决方案,换了台机器,ubuntu 的,发现 ps 有不小的区别,可以这样:
$ps -eo pid,lstart,args | grep httpd | grep -v grep
2374 Wed Sep 13 00:41:59 2006 /usr/local/httpd/bin/httpd -k restart
2469 Wed Sep 13 00:42:03 2006 /usr/local/httpd/bin/httpd -k restart
22470 Wed Sep 13 00:42:03 2006 [...]

Read More..>>

在MacosX安装fontconfig-2遇到的问题

Posted on 09月 11, 2006 - Filed Under Bsd, Linux, MacosX, Unix | Leave a Comment

make install 遇到这样的提示

dyld: Symbol not found: _FSPathMakeRef
Referenced from: /usr/local/lib/libfreetype.6.dylib
Expected in: flat namespace

实际上是运行 fc-cache 时出现的问题,实际上就是freetype没有安装好,只要重新安装一次freetype,在 ./configure 加上一句 --with-old-mac-fonts 然后 make clean;make;make install 搞定。
我是看这里找到的解决方法:
http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/28/0019.html

Read More..>>