Archive

Archive for the ‘Bash Tip & Tricks’ Category

How to select odd (or even ) raws from a text file using the bash

January 27th, 2012 No comments

Yesterday I had to select some raws (1, 5, 9, ….) from a text file.

This has been a hard job because I was trying to solve the wrong problem……

Really, before coding you should analyze deeply your problem and then you should think which tool you need to use.

However, come on and see my experiments:

First of all we need a test file, I'll use the following:

How to solve “libssl.so.10: cannot open shared object file: No such file or directory” error in Ubuntu 9.10

January 23rd, 2012 No comments

During my experiments with LTIB I've encoutered the following error

 

Processing: gettext

=====================

3 ways to remove duplicate lines from a text file

December 27th, 2011 No comments

 

One of the more diffcult job, while using the shell, is working with text files to filter their content.


In the following few lines you will find 3 different ways to remove all the duplicate lines from a text file.


First of all, I'll introduce three commands that are available on almost all of the linux distributions, and maybe in all Unix dialects:

uniq

Discard all but one of successive identical lines from INPUT (or standard input), writing to OUTPUT (or standard output).

 

How to install Twidge on centos

December 12th, 2011 No comments

Last week I needed to install twidge on a centos 5.7 server.

Truly, twidge is very simple to install into debian (or derived) linux distribution, but I found some problems while installing it into my centos server. 

First of all you shall download the twidge binaries from here:

https://github.com/jgoerzen/twidge/downloads

the twidge binary requires libcurl-gnutls

simply type the following command:

2 tricks to be happy while running Ubuntu 11.10 on your laptop

November 21st, 2011 1 comment

Ubuntu 11.10 is great OS but it has some things to change, especially if you want to work on a laptop.

The first one is the battery drain, if you don't use any tricks Ubuntu can drain your battery instantly. So I use a fantastic applet to reduce the power consumption:

Ubuntu 9.10: error while loading shared libraries: libtinfo.so.5

October 23rd, 2011 No comments

 

Under Ubuntu 8.10, 9.04 and 9.10 the entrypoints for libinfo are part of ncurses.

The libtinfo.so functionality is built into the libncurses.so shared library. So for software that uses the libtinfo.so object you need to install ncurses. I have had to install ncurses because I was trying to build a busybox system on my Ubuntu box and mconf told:

How to take a screen shot of the iphone display

October 10th, 2011 1 comment

Since iOS 2.x the iPhone operating system comes with the capability to take screen shots from the current running application. This feature sometimes can be very useful, but the gesture to take the screen shots is very simple but it isn't very publicized.

How to create a ramdisk on Mac OS X Snow Leopard

September 27th, 2011 No comments

From the wikipedia

"A RAM disk or RAM drive is a block of RAM that a computer's software is treating as if the memory were a disk drive.

….

….

….

Simple traffic analyzer script

July 14th, 2011 Comments off

When you are working on embedded systems you couldn't have some useful tools to monitor the system resource;

In the following you will find a simple shell script I use when I want to monitor the network traffic on a Linux box.

A simple tool to modify initrd and rootfs

March 11th, 2011 No comments

 

If you want to customize a distribution to boot only on your particular computer you should be able to modify the initrd and rootfs files.

Statistical data collected by Statpress SEOlution (blogcraft).