Creating A Terminal Window Clock

January 10, 2012 by · Leave a Comment
Filed under: bash, command line, HowTo, linux 

If you've been using Linux for a while, you may be familiar with the terminal command, date. The date command will display the current date and time to the terminal. On my system, the default output of date looks like this: Read more

Batch Converting Audio With GStreamer

December 19, 2011 by · Leave a Comment
Filed under: bash, HowTo, lame, linux, mp3, Ubuntu 

I recently got a new TV that allows me to stream audio and video from my computer to the TV. I tend to archive music from CD's I've purchased in FLAC format. Unfortunately, FLAC is not one of the formats supported by my TV. I decided to write a little script to convert my music archive into one of the supported file formats. Read more

Watermark Images With Nautilus Actions

March 21, 2010 by · 1 Comment
Filed under: bash, gnome, HowTo, image editing, linux, Ubuntu, web development 

In my last post I showed how you can add your own custom functions to the GNOME file manager with Nautilus Actions. I've also shown previously how to batch watermark images with ImageMagick. I've made some adjustments to my previous script so that it will automatically scale the watermark to fit the target image. Read more

Bash to Basics: The For Loop

February 14, 2010 by · 2 Comments
Filed under: bash, HowTo, linux, Ubuntu 

Previously I've shown how to use the bash while loop in a bash script. Today I'm going to show how to use another type of do loop in bash: the for loop.

The for loop is a little different from the other looping structures in bash. The other loop structures work by evaluating whether an expression is true or false. The for loop works on lists of values. As long as there are items left in the list, the for loop will execute.

Here's a basic example. Read more

Bash to Basics: The While Do Loop

September 13, 2009 by · 4 Comments
Filed under: bash, linux 

The While Do Loop

One of the most common structures in programming is the Do Loop. The version that I'm going to show today is the While Do Loop. The basic structure of the While Do Loop is: while condition A exists, execute the loop. Here's an example program that counts to ten and then exits. Read more

Next Page »