Data processing with the Linux tools

Computers were originally developed to perform computations, so it makes sense that they come equipped with all the tools you need to solve a variety of simple computation problems. A number of diverse and widely available scripting languages can manipulate data and deliver the information you need.

To demonstrate Linux tools at work, I use three common scripting languages, Perl, Python, and Tcl, to address an everyday problem: calculating the total distance driven based on entries in a driver's logbook. I also solve the same problem using the database management system PostgreSQL and the open source LibreOffice Calc spreadsheet program.

The Problem

Drivers often have to keep a logbook as a job requirement or for tax purposes. Sometimes, the only number needed in the end is the entire distance driven. The question becomes how to compute this number from the log entries with the least amount of effort. Creating and installing a special program to do this would be a bit over the top, so the solution presented here demonstrates how to solve this problem using the tools you can find on a Raspberry Pi.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Connecting a weather station to your Arduino

    After losing one weather station to tropical winds, the author reboots and designs a PCB that connects to an Arduino and monitors weather instruments.

  • Tracking airplanes in real time with ADS-B

    Airplanes continuously broadcast signals that identify the aircraft and its current flight path. With a moderately priced receiver and a Raspberry Pi, users can receive ADS-B transponder data in real time.

  • Graphical displays with Python and Pygame

    As its name implies, Pygame is a set of Python modules designed to write games. However, many Pygame modules are useful for any number of projects. We introduce you to a few Pygame modules that you can use to create custom graphical displays for your project.

  • A home intrusion detection setup (sort of)

    At least part of the popularity of the Raspberry Pi can be attributed to its high maker value; that is, a skilled maker with a Pi can build marvelous and beautiful things. Me? Not so much, but I was willing to try to build a home security system with the stuff in my junk box. Here's what happened …

  • Using a Raspberry Pi to make a hamster pedometer

    Researchers assert that hamsters run the equivalent of four marathons per night. We tested this with the help of a converted playback head from a video recorder, a hall sensor, and a Raspberry Pi.