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

Articles found under tag: bash

Scripting a fancy chooser for recently used files

By

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

By

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

By

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

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

News Elsewhere

Linuxtoday.com

The Big Nouveau Rework Will Indeed Land For Linux 4.3

Phoronix: A few days ago I wrote about the open-source NVIDIA kernel driver going through a big rework and now that code has been queued up into DRM-Next for Linux 4.3.

Integration process for openSUSE Tumbleweed, Leap explained

Leap is trying to find the balance between how much SLE (SUSE Linux Enterprise) and how much Tumbleweed

Cyanogen Tapped For New Wave of Affordable Smartphones

Linux.com: After many delays, all four major mobile Linux alternatives to Android have finally arrived on smartphones.

Linux 4.2 Released Improving Cryptography Options

LinuxPlanet: After eight release candidates, Linux 4.2 is now available, marking one of the longer development cycles in the last few years.

Intel Pumps OpenStack Up

LinuxInsider: While it's "substantially simpler" to stand up an OpenStack implementation today than it was two to three years ago, it's still far from a turnkey, click-through exercise

How to Defragment Linux Systems

MakeTechEasier: There is a common myth that Linux disks never need defragmentation at all.

Running a Private Docker Registry on EC2

Docker provides an open source registry implementation called “Distribution,” making it simple for anyone to run a private Docker registry

Is Linux Right For You?

 Datamation: I enjoy using Linux on the desktop.

KDE Plasma 5.4 Enhances Linux Desktop Experience

In this slide show, eWEEK examines some of the key features of the KDE Plasma 5.4 desktop.

GamingOnLinux.com Latest Articles

Obsidian: Developing For Linux Was Not Worth It

In a recent interview with PC Gamer, lead producer Brandon Adler of Obsidian said, "I don't think it was worthwhile developing for Linux. They are a…

The Bug Butcher, A Fun Early Access 2D Shoot Em Up

With all the big titles coming to Linux, it is easy to miss the smaller ones. You do not always want to invest hours of your life building an empire…

Vulkan Looks Impressive Against OpenGL In A New Intel Demo

Intel are now showing off a new benchmark they created to test Vulkan against OpenGL, even though it's running on Windows it's pretty impressive.…

BlazeRush Is A Fantastic Combat Racer On Linux, It’s Actually Hilarious

I’m not always a fan of combat racers, but wow BlazeRush is quite a surprise to find.My thoughts After the utter disgrace that MadOut was, I…

Road Redemption Could See A Linux Release In The Next Two Weeks

Exciting news! Road Redemption is a title I've really wanted to play since I saw it on Kickstarter, as a spiritual successor to Road Rash which I…

MadOut Is A Pretty Terrible Combat Racer On Linux

Here I am pointing out another game you should probably avoid on Linux. This time it’s the turn of MadOut, a combat racer that’s just not…

Psychological Horror Adventure Game 'Fran Bow' Released On GOG And Steam, Has Demo

Fran Bow is the creepy point-and-click adventure game about a young girl, who is sent off to a mental institution for children after her parents are…

Attention, Comrades! We Have A Livestream At 5 PM UTC!

The high command wishes to relay to you a message about today's livestream which is indeed happening as it usually does on Fridays. And because we…

Sol, A Cute And Mod-Friendly Platformer, Goes Even Further With Providing Accessibility Options

The charming little platformer, noteworthy for its advanced accessibility options and its copyleft license, was recently updated. It now features a…

GTX 760 Vs R7 370 4G In Company Of Heroes 2

Liam has done his initial port reports and such so it's my turn to feed you some information. I'm once again putting my GTX 760 against the R7 370 to…

Cossacks 3 RTS Shows Off Ukraine In A New Video

I am especially excited to have Cossacks 3 on Linux, and this new teaser video is short and sweet, but it's keeping me excited.About the game…

Solar Shifter EX Looks Like A Pretty Good Bullet Hell Space Shooter

Solar Shifter EX will release for Linux on Steam on the 11th of September, and I must say it looks pretty impressive. Their Steam page isn't up yet,…

I Can't Escape: Darkness, A New Horror Game Coming September For Linux

I Can't Escape: Darkness is a pretty interesting looking horror game that has a confirmed Linux release this September. I look forward to giving it a…

Rocket League Officially Coming To Linux/SteamOS, Rocket League & Portal 2 Free With Steam Hardware

Rocket League is massively popular right now, and we are happy to confirm it's heading our way! You even get a free copy with Steam Hardware. The…

Company Of Heroes 2 Released For Linux, Port Report & Thoughts Included

Feral Interactive have ported yet another excellent game, and this time we are graced with Company Of Heroes 2! It’s yet another game I've been…