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

Articles found under tag: bash

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 sequences of numbers on the command line

By

There are two easy-to-use tools for generating numerical sequences. 'Brace expansion' is a BASH shell built-in, while the seq command is included in the GNU/Linux 'coreutils' package. Each tool has its peculiarities and advantages, as shown below. Simple sequences One difference between the two…

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

News Elsewhere

Linuxtoday.com

Easily Analyze Your HTTP Traffic: Install And Configure Webalizer On Ubuntu 15.04

 LinuxPitStop: Webalizer is a free application for the analysis of web server logs.

Engineers at Etsy play by their own rules

 opensource.com: Etsy, the leading marketplace for handmade goods, has grown by leaps and bounds over the past five years.

Linux Top 3: Linux Mint Rafaela, OpenMandriva Lx 2014.2 and VectorLinux 7.1

LinuxPlanet: With the recent demise of Mandriva it's important to remember that there are not one, but two forks that are still alive and well.

6 time-consuming tasks you can automate with code

 opensource.com: A little bit of coding knowledge can let anyone write small scripts to do these tasks and save them hours (or weeks or months) of effort.

Install LibreNMS New Fork From Observium

 unixmen: LibreNMS is an autodiscovering PHP/MySQL/SNMP based network monitoring tool

How to upgrade Debian Wheezy to Jessie safely

 HowToForge: This tutorial explains how to upgrade your Debian system from Wheezy to Jessie in a few simple steps.

How to configure SNMPv3 on ubuntu 15.04 server

 UbuntuGeek: Simple Network Management Protocol (SNMP) is an "Internet-standard protocol for managing devices on IP networks".

SSH To Multiple Machines Simultaneously with DSH

 techthrob: Once you grow beyond managing one or two servers, you???ll find yourself wasting a ton of time if you don't have a way to run commands on multiple Linux computers simultaneously.

Crunchbang Monara based on lastknown Crunchbang release.

Monara is a light and fast operating system based on Debian 8.1 base, built on the Openbox window manager with #! tweaks.

GamingOnLinux.com Latest Articles

NEON STRUCT Stealth Game Shows Promising Linux Sales

The developer of NEON STRUCT the stealth game from Minor Key Games (Eldritch, You Have to Win the Game, Super Win the Game) has posted stats of their…

DiRT Showdown Looks Like It's Getting A Linux Release

DiRT Showdown is a highly rated racing game that looks like it's close to a Linux release, exciting times for racing fans! We don't have many racing…

3D Sandbox Puzzler 'Infinifactory' Officially Released For Linux

The sandbox factory puzzler by SpaceChem and TIS-100 developer Zachtronics has left Early Access after five months of tweaks and bug fixing.…

The Last Dogma, A Dark Comedy Exploration Adventure Is Now Available On Steam For Linux

The Last Dogma is now available on Steam for purchase:http://store.steampowered.com/app/374510 It got a massive 1.3 update and features a SteamOS…

Portal Stories: Mel, A Free Standalone Portal 2 Mod Released On Steam

A free standalone(-ish, I'll talk about that a bit later) Portal 2 mod called Portal Stories: Mel has been released on Steam. So those who want more…

Tabletop Simulator Review - My Thoughts On Rolling Digital Dice

“What's the deal with all these simulator games?” Stand up jokes aside, I often catch myself asking some variant of that question…

Unity Editor For Linux In Progress, Experimental Build Could Come Soon

It was heavily requested, and a Unity developer has written a blog post giving us a lot more insight into what’s going on.QuoteAt Unite Europe…

Pillars Of Eternity 2.0 & Expansions Announced, Looking Great

Pillars Of Eternity looks to be solving issues I had with it, and then some with the 2.0 release and expansion. First of all, here's a look at the…

SMACH Zero, A SteamOS Handheld Official Specifications Revealed

SMACH Zero previously known as the SteamBoy has revealed the specifications it should be releasing with. I am still extremely sceptical that it will…

Arcade Brawler 'Kung Fury: Street Rage' Available On Steam For Linux

Street Rage is the video game tie-in to the 80s style action comedy flick Kung Fury, which was funded on Kickstarter last year. The movie is an over…

Distance Is The Racing Game I Never Knew I Wanted On Linux, Some Thoughts & Video

Distance is a beautiful neon survival racer that I finally had a chance to play, and what I found really did surprise me.About the game (Official)…

Gameplay Trailer Released For Upcoming Co-Op Platformer Shift Happens

Shift Happens is a co-op platformer in development built around the concept of shifting mass between two player characters, and it promises a…

Developer Of Limit Theory Has Returned After Months Of Silence

Some of you might remember this open, procedurally generated space exploration / exploitation game that was kickstarted in late 2012. The project has…

Oil Enterprise Strategy Game In Early Access For Linux Gamers

Oil Enterprise is a business simulation that has been available in steam Early Access for about a month and it has been available for Linux from…

VoidExpanse Space RPG Major Updates & It Now Uses Correct Linux Data Structure

VoidExpanse is a good looking and fun space RPG game from AtomicTorch Studio. It has recently been through some major updates, and they finally…