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

Articles found under tag: scripting

Finding unmatched braces (brackets)

By

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

By

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

By

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

By

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)

By

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

By

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

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

News Elsewhere

Linuxtoday.com

Linux Mint 18.1 Is The Best Mint Yet

FreedomPenguin: Linux Mint 18.1 is out and it's arguably the best Linux distro available.

Descent OS Is Dead, Arkas OS Takes Its Place and It's Based on Ubuntu 16.04 LTS

 softpedia: Descent OS first appeared in February 2012 as a lightweight Ubuntu derivative built around the GNOME 2 desktop environment.

The 'New' Microsoft is Still Acting Like a Dangerous Cult in an Effort to Hijack and/or Undermine All Free/Open Source Software

 TechRights: In an effort to combat any large deployment of non-Microsoft software, the company goes personal and attempts to overthrow even management that is not receptive to Microsoft's agenda

3 things companies must know about data sovereignty when moving to the cloud

EnterprisersProject: I hear it nearly every day – the lament of teams trying to transform their enterprise from '80s-era software to the cloud

Linux 4.10 Released as First New Kernel of 2017

LinuxPlanet: After a one week delay, Linus Torvalds released the first new Linux kernel of 2017 on Feb. 19, with the debut of Linux 4.10.

Total War: SHOGUN 2 looks like it will be heading to Linux & SteamOS

GamingOnLinux: Well this was quite a surprise to see! It looks like Total War: SHOGUN 2 is going to make an appearance on Linux & SteamOS.

How To Use Plex To Cast Local Videos To Chromecast (From Your Desktop w/ Optional Mobile App)

webupd8: Plex is the complete solution for all local media streaming to Chromecast needs, and is fairly easy to set up.

GamingOnLinux.com Latest Articles

Black Ice, the 'hack and shoot' FPS has a major update to change the entire game

Tags: Action, FPS, Early Access, Steam, Itch.ioBlack Ice [itch.io, Steam, Official Site] is another one high on my list of promising Early Access…

How to record videos on Linux using OBS Studio with separate audio tracks for gameplay and microphone

Tags: HOWTOSomething I had been meaning to check out for a while is how to easily record videos of games, but have my microphone and the game audio…

Serious Sam 3: BFE with the 'Fusion' engine and Vulkan could arrive next month in Beta

Tags: Action, Coming Soon, FPS, Steam, Vulkan Croteam has stated on their forum that Serious Sam 3: BFE [Steam] running on their new Fusion engine…

MX Nitro, a positively rated motocross racing game is heading to Linux, should be here 'very soon'

Tags: Coming Soon, Racing, SteamMX Nitro [Steam, Official Site] is another title that popped up on SteamDB today and the developers behind this…

Total War: SHOGUN 2 looks like it will be heading to Linux & SteamOS

Tags: Coming Soon, Steam, Strategy Well this was quite a surprise to see! It looks like Total War: SHOGUN 2 [Steam] is going to make an appearance on…

I Am The Hero, a surprisingly great beat 'em up has Linux support

Tags: Action, Beat 'em up, Indie Game, Steam, Initial Thoughts I Am The Hero [Steam, Official Site] is an indie beat 'em up that I've actually been…

Rencounter, a turn-based roguelike RPG adds Linux support, a quick look

Tags: RPG, Roguelike, Steam, Indie Game, Initial ThoughtsRencounter [Steam], a reasonably good looking turn-based roguelike RPG has recently added…

Motorsport Manager 'GT Series' DLC announced, looks and sounds like fun

Tags: Coming Soon, DLC, Racing, Simulation, Steam Motorsport Manager [Steam] is to get a major gameplay DLC named 'GT Series' which will add-in…

Major update of the open source FPS 'Unvanquished' due soon

Tags: Action, FPS, Open SourceUnvanquished, the open source humans vs aliens FPS is due to get a massive update soon and it sounds pretty decent. See…

Colony building sim ‘Maia’ huge update released featuring Lava and colonist relationships

Tags: Early Access, Indie Game, Itch.io, Simulation, Steam, Initial ThoughtsMaia [Steam, itch.io, Official Site], the colony building simulation from…

Tonight at 20:00 UTC we continue Civilization VI live on Twitch

Tags: LivestreamTonight I shall once again be joined by Samsai and BTRE live on Twitch as we continue our quest towards world domination, something…

Join me for the livestream tonight at 20:30 UTC

Tags: LivestreamTonight I shall be continuing a little in Half-Life 2: Update (my first ever play-through) and another game Samsai is forcing me to…

Wine 2.2 released with even more Shader Model 5 instructions and work towards Direct3D command stream

Tags: WineWine development is starting to heat up again, as Wine 2.2 is now officially available. Sounds like a good one too.What's new - Windows…

Fumiko! Possibly one of the weirdest platformers I've ever played was developed on Linux, lots of bugs

Tags: Unity3D, Indie Game, Steam, Platformer, Initial Thoughts, Itch.io Fumiko! [itch.io, Steam, Official Site] An incredibly strange platformer was…

Friday Livestream today at 6 PM UTC!

Tags: LivestreamNew games and lots of them! Prepare yourselves and adjust your monitors to our frequency for yet another evening (or day, morning,…