随笔分类 -  Mac OS X & iOS

摘要:'\n' in the replace pattern in sed command doesn't work in Mac OS X.On Debian, we can get bellowing result:root# echo abc | sed 's/[^\n]/&\n/g'abcroot# But on Mac, it goes like this:user$ echo abc | sed 's/[^\n]/&\n/g'anbncnuser$Solution is to add \'$' bef 阅读全文

posted @ 2013-01-28 16:02 name2579 阅读(263) 评论(0) 推荐(0)

摘要:1. Edit or create file ~/.bash_profile.2. To add new alias 'll' in ~/.bash_profile with bellowing line:alias ll="ls -laG | less" 3. To add global variable:export u="/Applications/Utilities/" Save the file and open a new terminal window, those alias and variables are useab 阅读全文

posted @ 2012-10-15 11:34 name2579 阅读(246) 评论(0) 推荐(0)

导航