Remove Line Breaks with tr

I had a text file with multiple lines of input that I was manipulating using awk and sed but I found the following 'tr' command easiest to remove the line breaks: cat input.txt | tr -d '\n'

BIND on CentOS 5

The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi... » More

USB Multiboot Drive

This tool from pendrivelinux.com is a useful utility to help create a bootable USB pen drive with a menu system for booting into multiple operating systems. It works from within Linux/Ubuntu although there is a Windows tool available too. Useful for... » More

Apache GeoIP Country Detection

Creating customised content based on the origin country of your website visitors requires installing the mod_geoip module for Apache and also the MaxMind GeoIP database as follows (on CentOS): mkdir ~/geoip cd  ~/geoip wget... » More

Android Screenshots on Ubuntu

So I wanted to create screenshots of my HTC Hero Android phone from my Ubuntu desktop. So I ... downloaded and extracted the android sdk to e.g. ~/programs cd into the ./tools directory run the ./android program Install any version specific... » More

Creating a Yum Repository

Armed with a few RPMs I need to install on multiple machines and sick of SCP'ing files around machines I decided to set up a Yum repository. Here's how: On a machine that already has Apache running and serving content: yum install createrepo cd... » More

PHP Web Scraping for Munin

There is a web page created by someone else containing figures I would like to use to draw some graphs in Munin. The HTML in that page is a bit ugly and looks like: <TR ALIGN = "Center"> <TD ALIGN = "Left" WIDTH = "49%" BGCOLOR =... » More

Squid Problems

Todays installment in the Adventures of Squid Sandwich: Forwarding loop detected WARNING: Forwarding loop detected for: in /var/log/squid/cache.log Since I am using a DansGuardian sandwich with Squid for bread  I set the unique_hostname... » More