Category Archives: Operating System

Grep Exercise (From “UNIX® Shells by Example Fourth EditionBy Ellie Quigley”)

With the same text file from the previous post we have these questions: Print all lines containing the string San. Print all lines where the person’s first name starts with J. Print all lines ending in 700. Print all lines … Continue reading

Posted in Exercise, Grep, Linux, Programming | Tagged , , | Leave a comment

Everyday useful sed command

If you have this text file containing: █▓▒░bondhan@optimus-prime█▓▒░ Wed Dec 22 14:00:23 /media/BONDHAN_4GB/workspace/grep_exercise/ cat grep_exercise.sh 1. Print all lines containing the string San. 2. Print all lines where the person’s first name starts with J. 3. Print all lines ending … Continue reading

Posted in Linux, Programming, Sed | Tagged , | Leave a comment

Sed Exercise (From “UNIX® Shells by Example Fourth EditionBy Ellie Quigley”)

To become familiar with sed (stream editor), I decided to write the answer of exercise from the book titled “UNIX® Shells by Example Fourth EditionBy Ellie Quigley”. Download here for downloading the questions and answers, or directly from your beloved shell wget … Continue reading

Posted in Exercise, Linux, Programming, Sed | Tagged , | Leave a comment

Organizing e-Books using Bash

To become familiar with *nix scripting, I told myself to write a small script written in bash. The script will find certain ebooks (using keywords) then write the found results into a text file. From the found results, the script … Continue reading

Posted in Bash, Linux, Programming | Tagged , , , | Leave a comment

A simple-multipurpose GNU Makefile

Since joining the current company, I usually make my own Makefile rather than using the default Makefile from eclipse. I feel that make is very powerful, just by calling make and its parameters, there you are, you get your binary … Continue reading

Posted in C/C++, Linux, Programming | Tagged , , | Leave a comment

Forwarding ssh socks to outside users

Here’s the scheme. My fellow friend borrowed me a tunnel to his (sort of) expensive VPS and told me to create a socks using ssh with this command: ssh -fND localhost:6666 account@his-vps.org After setting the proxy (using sock not http) … Continue reading

Posted in Linux, Networking | 2 Comments

SMP vs AMP

Symmetric Multiprocessing SMP advantages: Programs must be written for multithreaded processing to benefit from the parallel nature of SMP. If external interrupts are handled by a one core, existing programs that are not written to be multithreaded may benefit by being … Continue reading

Posted in Microprocessor, Operating System | Leave a comment