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

Articles found under tag: scripting

Finding unmatched braces (brackets)


Recently I was checking for unmatched braces in a big text file with nearly half a million lines (300+ MB). Was there a closing brace for every opening brace? The text file was called 'beetle' and was actually a tab-separated table with each line divided into 77 fields. What I wanted to do was find…

Read Article

How to use flags in AWK


Flags in AWK are variables which are set to either true or false. They're handy for defining ranges over which AWK can act, as shown below. The AWK used here is GNU AWK 4.1.1 (gawk 4). Sometimes flags aren't needed I'll demonstrate with a simple text file called demo, which has 6 lines with 3…

Read Article

Proofreading for illusions with grep and AWK


Lexical illusions are very hard to find when proofreading. The most common lexical illusion is a duplicated word, as in this well-known example: A lexical illusion: many people are not aware that the the brain will automatically ignore a second instance of the word 'the' when it starts a new line. …

Read Article

Transposing rows and columns: 3 methods


Swapping the rows and columns in a table on the command line would seem to be a fairly easy thing to do. For example, with this tab-separated table (called 'tabbed') as input: get this tab-separated table ('swapped') as output: Datamash Transposing rows and columns is indeed easy if you have the…

Read Article

I think I like backreferences (sometimes)


Backreferences are part of the complicated and sometimes confusing world of regular expressions. The basic idea is this: you can substitute any part of a regular expression with a backslash followed by a number, so long as you surround the part to be substituted with round brackets. The command…

Read Article

Keeping emails as text files: 2 scripts


Most people store and organise their personal emails as individual files (messages) in folders. Those folders might be on a webmail company's servers, or in a mail client program on the user's personal computer. In both cases the emails are probably in a special email format. I'm horribly…

Read Article

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

News Elsewhere

Renesas spins 3rd Gen automotive starter kits, adds new M3 SoC

Renesas has launched two Linux-ready R-Car starter kits optimized for AGL and GENIVI: an R-Car H3 based Premier and a Pro with a lower-end M3 SoC.

The Dirty Cow Linux bug: A silly name for a serious problem

ZDnet: With attacks in the wild reported, you need to fix this Linux bug as soon as possible.

ZDnet: With attacks in the wild reported, you need to fix this Linux bug as soon as possible.

Deus Ex: Mankind Divided Is Coming to Linux on November 3, Ported by Feral Interactive

Feral Interactive has yet to announce the system requirements for Linux gamers.

Five Cool Alternative Open Source Linux Shells

We are going to look at some of the available Linux shells out there that users have access to free of charge

Meet Remix IO, All-in-One Android 7 Nougat-Powered PC, TV Box & Gaming Console

Remix IO is an all-in-one device that can be dubbed as a TV set-top box powerful enough to play 4K movies, an office or home PC, as well as a gaming console.

OpenStack installation and configuration

jointux: In this article, I will explore how to install and configure OpenStack in an easy way.

Nino Vranesic: Open Source Advocate and Mozilla Rep in Slovenia

 FOSSforce: What's it like to advocate for open source and be a rep for Mozilla in Slovenia? Latest Articles

Do you have small children? If so, check "It's Spring Again", an educational indie game about the seasons

Tags:Casual,Demo,Educational,Indie Game,SteamIt's Spring Again is a extremely small educational game which aims to teach very young children about…

Save your land from a supernatural infection in 'Disturbed', a short free visual adventure

Tags:Adventure,Casual,Free Game,Horror,Visual NovelDisturbed is a visual adventure with hand-made black and white graphics, where you play as a…

Team Fortress 2, has fixes for Linux texture handling issues

Tags:Action,FPS,Steam Team Fortress 2 [Steam] has a big halloween update, and with it a well needed fix for the Linux version to do with textures.…

Don't Starve Together 'A New Reign' update allows players to share minimaps

Tags:Sandbox,Steam,SurvivalDon't Starve Together [Steam, Official Site], the multiplayer expansion of action-adventure video game Don't Starve, has…

Join me tonight for the Linux Gaming Livestream at 19:45 UTC

Tags:LivestreamIt's Friday! Time to throw your pants out the window and watch our weekly Friday livestream! Actually, don't throw them out, bit…

The Linux version of Arma 3 is set to continue on, and Arma 3 plans to go 64bit

Tags:Action,FPS,Simulation,Steam,Virtual Programming Good news for Arma 3 [Steam] fans today, as Bohemia Interactive have released their next…

'Polygod', a randomly generated FPS with a brutal difficulty curve is now on Linux

Tags:Action,Early Access,FPS,Indie Game,Roguelike,Steam 'Polygod' [Steam, Official Site] is an Early Access FPS with a focus on random generation and…

'Sally Face', a rather intriguing & dark adventure game about a boy with a prosthetic face

Tags:Unity3D,Adventure,Crowdfunding,Indie Game Well if that headline didn't catch your attention I don't know what will. Sally Face is a dark…

Deus Ex: Mankind Divided arrives on SteamOS & Linux on the 3rd of November

Tags:Feral Interactive,Coming Soon,Steam,FPS,RPGSeriously, what the heck Feral Interactive! First Dawn of War II, then Mad Max and very quickly after…

The latest 'Steam Client Beta Update' fixes wired Steam Controller support on Linux

Tags:Hardware,Steam,Beta Those of you who have been having trouble with the Steam Controller when in wired mode may appreciated the latest Steam…

Bastion for Linux is finally available on GOG, the game also now uses FNA

Tags:Action,GOG,Adventure,RPG As usual for GOG [Link], slow and steady! Bastion is now available on GOG and the game itself has been updated to use…

Rogue Singularity, a high-speed infinite obstacle course platformer has Linux support

Tags:Action,Platformer,Steam,Early Access,Indie Game Rogue Singularity [Steam, Official Site] is a pretty cool looking infinite obstacle course…

Speculation: A recent Mesa commit hints at a possible Batman: Arkham Origins Linux port (update: no it isn't)

Tags:Mesa,Drivers,Speculation,WineUpdate: Turns out it's not, as the author of the commit emailed me:QuoteNo, Batman is NOT being ported to Linux as…

Stellaris: Leviathans DLC and Heinlein patch 1.3 released

Tags:DLC,Steam,StrategyToday is a very good day, first Mad Max and now Stellaris DLC [Steam] and a big patch. As usual they have a bunch of new stuff…

Mad Max released for Linux, port report and review available

Tags:Action,Adventure,Feral Interactive,Review,Steam Mad Max is the latest Linux port from Feral Interactive, probably one of the titles I have been…