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

Articles found under tag: bash

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

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

News Elsewhere

Linuxtoday.com

15 Android Apps to Remote Control Your Linux PC

MakeUseOf: There’s no reason why Linux and Android shouldn’t get along well—after all, they’re pretty much cousins.

OS showdown: Windows 10 vs Linux

techradar: Redmond's new OS goes toe-to-toe with Linuxa

Cool Games You Can Play From Your Linux Command Line

We all know that every one like games, so we have created a list of games you can play from your Linux terminal.

Fish: A Smart and User-Friendly Interactive Shell for Linux

 tecmint: FISH is a user-friendly, interactive shell designed to work with any other shell like bash or ZSH.

Systemd v223 released

 ItRunsOnLinux: Systemd the (controversial) replacement for the old SysV init system is now at version 223, as announced by developer David Herrmann.

LibreOffice 5.0 Arrives on August 5, Here's What's New

The next major LibreOffice version is scheduled for launch this Wednesday, August

Arch Linux 2015.08.01 released

 ItRunsOnLinux: The popular Arch Linux distribution is now at version 2015.08.01 and is available for download.

Adobe Brackets 1.4 An Awesome Text Editor Released, Install In Ubuntu 15.04/14.04 Or Derivatives

 Linux&Ubuntu: Adobe Brackets is a text editor developed by Adobe developers.

Linux Kernel 3.12.45 LTS Has ARM64 and x86 Fixes, Numerous Updated Drivers

 softepedia: Linux kernel 3.12.45 LTS adds various improvements to the ARC, ARM, ARM64, x86, MIPS, SPARC, and PowerPC (PPC) hardware architectures

GamingOnLinux.com Latest Articles

New Linux Gaming Survey For August

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

DiRT Showdown Tested On Linux, Preview Port Report

Updates will be placed at the bottom, please read the bottom before deciding anything. I managed to get an early look at what will be one of Linux's…

The Linux Port Of Arma 3 Is "Promising"

Not much being said in public about the Arma 3 Linux port, but it seems it is progressing and could become a reality. If you remember, it was only…

Don't Starve: Shipwrecked Is A Brand New Single-player Expansion Coming This Fall

Need more to do in Don't Starve? It seems Klei Entertainment have your back. Don't Starve: Shipwrecked has been announced as a new single-player…

Shallow Space Looks Like The Spaceship RTS Game Linux Is Needing, Some Thoughts

It's not often I get over excited about a game, and I'm not entirely sure how this flew under my radar, but Shallow Space looks seriously good. You…

Point-And-Click Adventure 'Dropsy' Has A Release Date And An Amazing New Trailer

Dropsy is the crowdfunded point-and-click "hugventure" that looks set to either melt your heart or scar you for life. The game will be released on…

Adventure RPG 'Evoland 2' Release Date Announced, Linux Release Shortly After

Evoland developers Shiro Games recently announced the release date for the anticipated sequel, and though there's no firm release date for Linux yet,…

Virtual Programming Have Been Busy, Looks Like They Are Doing The Arma 3 Port

Thanks to the about page on Virtual Programming's official store, we have found out that they are the mystery external porter of Arma 3 that should…

Casual Clickers 'AdVenture Capitalist' And 'Time Clickers' Now On Steam For Linux

AdVenture Capitalist is a so-called "idle game" that has been available as a Flash game on Kongregate since last year, and is now available for Linux…

DiRT Showdown Confirmed For Linux By Virtual Programming, Pre-orders Open Up

DiRT Showdown is a good looking racer that is now officially confirmed for Linux, and it is available to pre-order. We didn't know who was doing the…

Codename CURE, A First Person, Co-operative Zombie Game Now On Linux

Codename CURE is a reasonable well rated first-person shooter on Steam, and it has been updated to include a Linux version. The game is free to play,…

Nuclear Throne, The Action Roguelike Has A Load Of New Content

It has been a while since I covered Nuclear Throne, and it's getting more awesome with every new build. In the latest build Nuclear Throne now has…

This Friday We Will Venture Into Mordor Live At 5 PM UTC

It's probably not going to come to you as a surprise that we are going to play Shadow Of Mordor on today's stream. So, prepare yourselves, man…

Don't Be Patchman Is The First Game On Steam To Be Linux Only

Don't Be Patchman is releasing very soon on Steam, and it's going to start by being a Linux-exclusive title. This won't stay forever though, but the…

Ziggurat Update 12 Has Been Released, Arrives On GOG

It's been a while since we last mentioned Ziggurat but the arrival of update #12 has given me a reason to remind you of this quite awesome game. The…