Command line calculator, bc

September 4th, 2006 mysurface

How to do calculation if I only have command line? If you have BC you can, and you can do a very complicated calculation. To perform calculation, you can type bc and start to type your question, or passing question through pipeline, such as echo “56.8 + 77.7″ | bc Let say you want to [...]

Posted in bc, Calculation, pipeline | Hits: 148897 | 21 Comments »

arrange your text nicely with column

August 17th, 2006 mysurface

Try to cat /etc/group, you will find the output text is showing name:x:id: …, which list of groups is separate by : To separate it nicely by columns, you can do that: cat /etc/group | column -t -s”:” Related Postsarray and for loop in awkgrep is always a useful tools to help analyze logs. When [...]

Posted in column, pipeline, Text Manipulation | Hits: 27095 | 1 Comment »

grep as a filter for your raw text based data

August 15th, 2006 mysurface

grep is a very useful and simple tools for a unix user to extract info from text based data files, command output, etc. grep always apply together with pipeline to simplified the data output we obtain to form the information which is presentable. For example, ps aux will shows info about the current running processes. [...]

Posted in cat, Common, grep, pipeline, ps, Text Manipulation | Hits: 38780 | 3 Comments »