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

Meet Apache Spot, a new open source project for cybersecurity

Cloudera and Intel on Wednesday announced that they've donated a new open source project to the Apache Software Foundation

Raspberry Pi Foundation Unveils New LXDE-Based Desktop for Raspbian Called PIXEL

Until today, Raspbian shiped with the well-known and lightweight LXDE desktop environment, which looks pretty much the same as on any other Linux-based distribution

Tiny, open, $18 quad-core SBC has WiFi, BT, eMMC, microSD

FriendlyARMs 40 x 40mm "NanoPi Neo Air" hacker SBC runs Ubuntu Core on an Allwinner H3 with 8GB eMMC, WiFi, BT, a DVP cam connector, and a microSD slot.

Mozilla tells Firefox OS devs to fork off if they want to chase open web apps vision

el Reg: Lizard also set to char Windows XP and Vista by ending support

What are configuration management tools?

opensource.com: Whether you maintain 5,000 machines or five, configuration management tools make the job easier.

MintBox Mini updated with faster AMD SoC and 8GB RAM

 hackerboards: CompuLab's Linux Mint flavored MintBox Mini Pro mini-PC updates the Mini with an AMD A10 Micro-6700T, plus BT 4.0, mini-PCIe, and twice the RAM and storage.

7 Ways Linux Users Differ from Windows Users

Datamation: Linux users are different from Windows users in attitude as much as their choice of operating system.

How to upgrade to Ubuntu 16.10 final beta from Ubuntu 16.04 LTS

ostechnix: How to upgrade to Ubuntu 16.10 (both Desktop and server) from Ubuntu 16.04 LTS and older versions.

LibreOffice Office Suite Celebrates 6 Years of Activity with LibreOffice 5.2.2

On September 28, the LibreOffice project celebrated its 6th anniversary, and what better way to celebrate than to push a new update

GamingOnLinux.com Latest Articles

Steam Hardware Weekend sale, bag some cheap kit, Steam Controller now has accessories

Tags:Hardware,SteamThe Steam Hardware Weekend sale is now live and it seems Valve now sell accessories for the Steam Controller. All items are now…

'Hybrid Wars', a futuristic top-down mech shooter released with day-1 Linux support,

Tags:Action,SteamHybrid Wars [Official Site, Steam] is a rather good looking futuristic top-down mech shooter that has now officially released, and…

Stardew Valley 1.1 beta now available, you can get divorced, new maps, new crops and more

Tags:GOG,RPG,Sandbox,Simulation,SteamStardew Valley [Official Site, GOG, Steam] 1.1 beta is now available with Linux support. It has a bunch of new…

Unity have released a preview of the Unity editor with the Vulkan API

Tags:Unity3D,VulkanThis is pretty exciting, Unity [Official Site] have released a preview update build of the Unity engine with the Vulkan renderer.…

Warhammer 40,000: Dawn of War II, Chaos Rising and Retribution released for Linux, port report and thoughts

Tags:Strategy,Steam,Review,Feral Interactive,BenchmarkFeral Interactive have ported another set of cracking good games. This time we have Warhammer…

'We Are The Dwarves' now available DRM free for Linux on GOG

Tags:DRM Free,GOGWe Are The Dwarves [Official Site, GOG], an action-based tactical adventure is now available for you GOG fans in their usual DRM…

Minecraft: The Exploration Update announced, new monsters, new animals and more

Tags:Sandbox The Minecraft [Official Site] developers have announced The Exploration Update and they have already released a development release for…

'Sunless Skies', the next game after 'Sunless Sea' to support Linux, will go to Kickstarter next year

Tags:Coming Soon,Crowdfunding Failbetter Games [Official Site] have announced their next game titled 'Sunless Skies' as the follow-on from 'Sunless…

'Osiris: New Dawn', a graphically impressive multiplayer adventure and survival game coming to Linux

Tags:Survival,Steam,Early Access,Adventure,Action,Unity3D'Osiris: New Dawn' [Official Site, Steam] is a very impressive looking mix of multiplayer…

InXile Entertainment announced Wasteland 3, will use crowdfunding on fig

Tags:Strategy,RPG,Crowdfunding,Coming SoonInXile Entertainment [Official Site] have formally announced that Wasteland 3 is a thing and it will go to…

'Stash: No Loot Left Behind', the new MMO from Frogdice is now available in Early Access

Tags:Early Access,Indie Game,MMO,SteamStash: No Loot Left Behind [Official Site, Steam] is the new MMO from Frogdice that features turn based grid…

'Pavilion', the very stylish fourth-person puzzling adventure released with day-1 Linux support

Tags:Steam,Puzzle,Indie Game,Humble Store,AdventureI wrote about 'Pavilion' [Official Site, Steam, Humble Store] months ago, so it's pleasing to see…

'Niche - a genetics survival game' released with Linux support

Tags:Early Access,Indie Game,Roguelike,Steam,StrategyThanks to a GOL supporter I've had a chance to check out 'Niche - a genetics survival game'…

Fusion 3, the next generation game engine and editor from Clickteam will support Linux

Tags:Coming Soon,Editorial,Game EngineClickteam [Official Site] are the company behind some really cool tools like Fusion, previously called…

Avoid the pile-up in 'Clustertruck', a first-person platformer with day-1 Linux support, it's great

Tags:Racing,Platformer,Initial Thoughts,GOG,Action,SteamClustertruck [Official Site, Steam, GOG] released today and I've had a chance to play some of…