The Linux Rain Linux General/Gaming News, Reviews and Tutorials

Articles found under tag: scripting

How to read a file N lines at a time in BASH: 3 methods

By

The file I'll be using for this demonstration is called demo and looks like this: demo is plain text with 2 tab-separated columns. The first column is sorted alphabetically, but the second column isn't sorted. What I want to find out is how many different letters are in the second column for each…

Read Article

Split a table and number the pieces: two methods

By

I worked on these bits of code to simplify a shell script of mine. You really wouldn't want to see the script's original commands here — they're way too ugly! The new commands are much prettier and work well. The problem To simplify the story, here's a comma-separated table called demo, sorted on t…

Read Article

Some baby name problems

By

No, these aren't homework problems from a computer science class. They're interesting head-scratchers based on a data-analysis project I worked on recently, with the data 'reimagined' here for simplicity but with the underlying problems intact. We'll start with boys and girls, which are text files…

Read Article

A "Track Changes" script for data cleaning

By

The complicated-looking script at the end of this article is in two parts. The first part detects the changes made when a data table is edited, and reports the changes as a plain-text logfile. It's a straightforward bit of shell scripting based on the diff command. The second part of the script…

Read Article

How to garble

By

In 2003 a strange paragraph made the rounds on email. It read: Aoccdrnig to rscheearch at an Elingsh uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, olny taht the frist and lsat ltteres are at the rghit pcleas. The rset can be a toatl mses and you can sitll raed it wouthit a…

Read Article

DMS to DD to KML with AWK and sed

By

In a 2014 Linux Rain article I describe a fast 'points plotter' for Google Earth. First I copy a list of latitude/longitudes (lat/lons) from a spreadsheet to the clipboard, then I launch a shell script with a keyboard shortcut. The script builds a KML file from the copied list and opens the KML for…

Read Article

Grouping things with AWK

By

In this article I explain one way to group data items with AWK arrays. The code is a little mysterious but the results are impressive, especially in my second example! Case 1: Cricket stats The table 'runs' is tab-separated and lists the 86 national team cricket players who scored (or have so far…

Read Article

Building a Desktop Wikipedia Checker

By

I often look something up in Wikipedia when reading non-browser documents, like PDFs, ODTs and emails. I wanted to have a little desktop window for those look-ups - somewhere I could check Wikipedia without opening a browser and without leaving the document I'm reading. This article describes how I…

Read Article

The header line: how to add, delete and ignore it

By

In a plain-text table, the first or header line usually contains the names of the fields. In this article I've pulled together a variety of ways to add and delete a header, and also how to do things with the rest of the table while leaving the header intact as the first line in the file. Add a…

Read Article

Joining Tables on the Command-Line

By

This article compares 3 different ways to join tables on a common field. All 3 work OK on small tables, but there's a big difference in speed when the tables to be joined are large, as shown below. Table joining isn't something you need to do if you store data in a simple, flat-file database like a…

Read Article

News Elsewhere

Linuxtoday.com

Firefox 39 Arrives After a Three-Day Delay

Mozilla has finally released the stable version of Firefox 39 after it delayed the launch for a couple of days

One world, one container: Open Container Project

cloudy weather: Today, containers are becoming the default way that people put apps on clouds

Q&A: Zipcar founder Robin Chase on open source and the collaboration economy

ITworld: Sharing is the "path of greatest value creation," says Chase.

Install Cacti (Monitoring tool) on ubuntu 15.04 server

Ubuntu Geek: Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality.

How to set up your Raspberry Pi in Mac OS X

TechRadar: Get some Apple in your Raspberry Pi

The Linux Setup - Neil McGovern, Debian Project Leader

MyLinuxRig: Neil is being modest when he calls Debian Project Leader a figurehead position.

Docker Machine 0.3.0 Deep Dive

For those of you who may not be familiar, Docker Machine is a tool to simplify the automatic creation and configuration of Docker-enabled machines

Domain Names Top 294 Million in 2015

EnterpriseNetworkingPlanet: Demand for Top Level Domains continues to grow in 2015, and new types of TLD expand their footprint.

Ubuntu Linux Lands on Intel Compute Stick

ServerWatch: Ubuntu Linux is widely deployed on desktops, servers and clouds around the world, and now it's coming to Intel's Compute Stick platform as well.

GamingOnLinux.com Latest Articles

Point-And-Click Adventure 'Anna's Quest' Released On GOG And Steam For Linux

Daedalic Entertainment's latest game, Anna's Quest, got a same-day release for Linux earlier this week, both on Steam and DRM free on GOG. I've…

Brushfire Games On Their Linux Sales For Shipwreck & Their Thoughts On Linux

A recent article about Jon Blow has spurred other developers getting in touch, and one developer is Brushfire Games, the developer of Shipwreck.…

Low Linux Sales Of Democracy 3 Leads To Jonathan Blow, Developer Of Braid Blasting Linux

I am always wary of posting articles like this, but sometimes what developers with influence say needs pointing out. This time Jonathan Blow who…

7 Days To Die Completely Broken For Mac & Linux

Just a little warning if you were thinking of picking up '7 Days to Die', they just release Alpha 12 which has completely broken Mac & Linux…

Project Zomboid Build 32 Is Live, Steam Integration Coming Soon

Project Zomboid is easily one of the best Zombie survival games around, build 32 adds a lot of new stuff, and Steam integration is coming soon.New in…

Trine Enchanted Edition Now Available On GOG For Linux

It's been a while, but Trine Enchanted Edition is finally available for Linux users on GOG. It's well worth checking out, so hopefully a few more of…

Guess What, It's Friday Again, Stream At 5 PM UTC!

Another week has passed and it's time for our weekly livestream with games and generally mediocre commentary. So clear up your schedule, hide your…

GOL Cast: Blowing Up Raiders Mad Max-style In Convoy

So what do you get when you mix FTL and Mad Max? Well, the answer would probably be Convoy. Let's take this roguelite game for a spin and blow up…

Terra Nova: Strike Force Centauri, Another Classic Released On GOG For Linux

Terra Nova: Strike Force Centauri is a classic tactical shooter that now has a Linux version on GOG, and it's highly rated. Originally released in…

New Team Fortress 2 Update Titled 'Gun Mettle'

TF2 seems to be doing what Counter Strike Global Offensive is with limited time campaigns, and charging for them. Some of the profits do go to the…

Victor Vran Release Date Announced, Going To Be Awesome

Victor Vran is now content complete with the latest patch, and it has a full release date now too. This is an action RPG not to miss out on folks.…

Civilization: Beyond Earth – Rising Tide Official Gameplay From E3

Civilization: Beyond Earth – Rising Tide will be coming to Linux, and we now have some more gameplay to see if it's worth picking up. Aspyr…

New Linux Gaming Survey For July

It's that time of the month again Linux gamers! The new GOL survey for July is now available, so please make sure to fill it in if you have the time.…

Torque 3D Game Engine 3.7 Released, Features Linux Support

You can add Torque 3D into the list of game engines that support Linux, it's not 100% finished, but it's good to see them do it.QuoteAs if you…

Can Rogue Invader Invade Linux? Help Bring It To Linux

Rogue Invader is a new roguelite game from Squishy Games (Nathan Rees and Lee J Hinkle) that is now counting on your votes on Greenlight. And they…