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

Articles found under tag: bash

Scripting a fancy chooser for recently used files


I recently scripted a GUI dialog that lists my 10 most recently modified files in reverse chronological order and allows me to choose more than 1 file for opening. The dialog is launched with a keyboard shortcut and is shown here with 2 files selected: The script is in copy-and-paste form at the…

Read Article

Gnumeric: a filter-and-export script


My wife likes to organise and store information in Gnumeric spreadsheets. Every now and then she needs to filter her data and save the result to a new spreadsheet. Gnumeric doesn't have a simple way to do that. It has a complicated way to do it ('Advanced Filter'), but nothing so straightforward as…

Read Article

How to insert code snippets on the command line without executing them


You can store a code snippet in a shell alias or a function, but when you type the alias or function name in a BASH shell and press 'Enter', the shell executes (or tries to execute) the snippet. That's no good if the snippet is incomplete or needs editing. A simple workaround is to paste the…

Read Article

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


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


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


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


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


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


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


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

News Elsewhere

Slackel Linux: Not Your Father's Slackware

LinuxInsider: Slackel offers a few advantages not usually found with the Slackware Linux lineup.

Polycom Advances Hardware for New Generation of Collaboration

Enterprise Networking Planet: Yup - Linux (in the flavor of Android..) powered

Full Speed Ahead with HTTP/2 on Google Cloud Platform

We’re not breaking any news here, because Google Cloud Platform support for SPDY has been enabled for many years, and support for its successor (HTTP/2) was enabled earlier this year.

Speeding Ahead with ZFS and VirtualBox

Freedom Penguin: Sometimes, a VM goes bonkers and you have to roll-back to a previous version of the VM; and sometimes VirtualBox's snapshots are useful for that.

Run a Minecraft server using Spigot

Fedora Magazine: Spigot is an open-source Java project that lets users run their own Minecraft server and add plugins to extend the possibilities of their server.

KDE Ships Plasma 5.4.2, bugfix Release for October

The bugfixes are typically small but important

Unomi: A Bridge Between Privacy and Digital Marketing The objective of Unomi is to deliver a software core that has all those capabilities to protect privacy of customers without taking away a valuable resource that can help companies improve their products.

Canonical Plays With Internet of Toys Idea

LinuxInsider: The company is partnering with the Hybrid Group and Erle Robotics for the initiative.

Hypocrite Forks the Linux Kernel Because of Cultural Characteristics That He Himself is Guilty of

techrights:  Forking of Linux is misleadingly reported in the media because of a couple of very loud people, who are not even quitting their jobs Latest Articles

Haque: Retro Roguelike RPG Requires Riches

Tags:Roguelike,RPG,CrowdfundingIf you're an old follower of The Funding Crowd and you have a pretty good memory you may remember Project Maiden by…

The GOL Game Jam Is Really Happening Soon!

Tags:Site InfoRecently I asked some opinions about us organizing a game jam here on GOL and I received a bunch of positive feedback and I will…

Epistory - Typing Chronicles Will Come To Linux

Tags:Action,Adventure,Coming Soon,Early Access,SteamEpistory - Typing Chronicles is a rather unique looking atmospheric action/adventure game, and…

Be A Space Marine In Templar Battleforce On Linux

Tags:Strategy,Steam,RPG,Action Templar Battleforce is a turn based human vs alien strategy game with RPG elements, and so far it does seem to be…

Cyberpunk Adventure 'Read Only Memories' Released DRM Free And On Steam, Has Demo

Tags:Steam,Point & Click,,Humble Store,GOG,Demo,AdventureRead Only Memories is a story-focused point-and-click with a diverse cast of…

Narrative Game 'The Beginner's Guide' Released On Steam

Tags:Steam,AdventureThe Beginner's Guide is the new game from The Stanley Parable creator Davey Wreden, and it was released for Linux on Steam last…

GOL Cast: Dominating Scoreboards In Polychromatic

Tags:Review,Indie Game,GOL Cast,Arcade,ActionAfter a pretty long hiatus related to my school work, I have finally returned to reclaim the GOL Cast…

Magicka 2 Looks Like It Will Land On Linux Soon, Having Final Tweaks

Tags:Steam,Coming Soon,Adventure,Action Just a heads up guys, Magicka 2 looks like it could land on Linux this month. A developer mentioned it's…

Divinity: Original Sin Enhanced Edition Looks Set For Release This Month

Tags:Steam,RPG,Coming Soon,Action Looks like Divinity: Original Sin will finally see the promised Linux version with the Enhanced Edition due on…

Survival Racer 'Distance' Is Now More Awesome With The 'Revamped Reality' Update

Tags:Early Access,Racing,Steam It's no small secret that I think Distance is bloody fantastic, and now even more so with the latest update. It…

Testers Needed For 'Quasar' An Online Bullet Hell Space Shooter, Linux To Be A First Class Citizen Here

Tags:Action,Arcade,Coming Soon,Early Access,Editorial,Steam Pretty safe to say Quasar caught my eye, and not just because Linux is going to be a…

Prison Architect Has Fully Launched, You Should Get It

Tags:Strategy,Steam,Sandbox,DRM FreePrison Architect is an absolute beacon of how to do Early Access right, and the final release is now available.…

Co-Op Stealth Game Clandestine May See A Linux Port

Tags:Unity3D,Early Access A developer from Logic Artists has shown renewed interest in porting their Early Access stealth game to Linux, though still…

Postal 1 Updated With Twin Stick Gamepad Controls, Possible Source Code Release & Sale

Tags:Steam,Action I have to hand it to RWS, they do support their games pretty nicely. Not only has Postal 2 been updated, but they have gone back…

This War Of Mine Finally Fixed For Linux, Includes Other Fixes & Workshop Support

Tags:Survival,Steam,DRM Free It's been a few months, but 11bit finally fixed up This War of Mine for newer Linux distributions. Previously it…