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

10 Portable Apps Every Linux User Should Use

MakeTechEasier: Portable apps allow you to take any program to any PC, and continue using it.

Oracle Linux 6.9 Released with Unbreakable Enterprise Kernel 4.1.12, TLS 1.2

Prominent features of Oracle Linux 6.9 include support for TLS (Transport Layer Security) 1.2 on all system components

Mozilla Firefox 52.0.2 Released to Fix Crash on Startup on Linux, Other Issues

Mozilla Firefox 52.0.2 comes about eleven days after the first point release, versioned 52.0.1,

Orange Pi SBCs offer a choice of 32- or 64-bit SoCs for under $20

The open spec "Orange Pi Zero Plus 2" SBC provides WiFi, BT, HDMI, MIPI-CSI, and a choice of quad-core Allwinner H3 (Cortex-A7) or H5 (-A53) SoCs.

How To Hide Files And Folders in File Manager Without Renaming

Three easy ways to hide files or folders in file manager.

Python Inheritance

LinuxConfig: Inheritance is yet another key concept in Object Oriented Programming, and it plays a vital role in building classes.

GNOME 3.24 Updates Linux Desktop Experience

eWEEK: New update of GNOME desktop environment adds enhanced features, including a new Night Light mode.

Raspberry Pi based computer offers Docker-enabled Real Time Ethernet

Hilscher is prepping a compact, rugged "netPI" computer that merges the features of a Raspberry Pi 3 with those of its "netHAT 52-RTE" dual Real-Time Ethernet RPi HAT

Linux block I/O tracing

Like starting a car with the hood open, sometimes you need to run your program with certain analysis tools attached to get a full sense of what is going wrong - or right.

GamingOnLinux.com Latest Articles

Strategy game 'Cossacks 3' will have a Linux beta on Friday and I have a key for one lucky person

Tags: Steam, Strategy Even though it was supposed to be delayed until April, GSC Game World have announced that there will be a public beta of the…

HEVN, a first-person sci-fi adventure game should have Linux support

Tags: Indie Game, Unity3D, AdventureHEVN [Official Site] was pointed out by GOL follower micha and after taking a look I was impressed, so I spoke to…

Game engine 'Construct 3' is now in open beta, check out my example game

Tags: Toolkit, BetaConstruct 3 [Official Site] is a game engine that requires little to no programming knowledge as it relies on stringing events…

Oxenfree is a clever, narrative driven supernatural thriller you should check out, my review

Tags: Adventure, Steam, Indie Game, GOG, ReviewI finally set aside some time to play the supernatural thriller Oxenfree [Steam, GOG,Official Site]…

Meganoid, a challenging platformer with roguelike elements releases soon with Linux support

Tags: Action, Coming Soon, Indie Game, Itch.io, Platformer, Roguelike, SteamThe latest game from Orangepixel, Meganoid [Official Site, itch.io,…

RUNNING WITH RIFLES has a major update and a DLC announcement

Tags: RUNNING WITH RIFLES [Steam, Official Site] is the rather excellent top-down shooter with RPG elements that has Linux support. A major patch was…

Blazing Chrome, a classic co-op run ‘n gun plans Linux support

Tags: Action, Coming SoonBlazing Chrome is a new co-op run ‘n gun being developed by JoySmasher [Official Site] and they are planning a Linux…

SC Controller, the stand-alone Steam Controller driver and UI has an important bug-fix release

Tags: AppsI've been using a lot of SC Controller [github] to play games with my Steam Controller outside of Steam, but it did have a major issue. I…

Planescape: Torment: Enhanced Edition officially announced with Linux support

Tags: Coming Soon, RPG, Steam, GOGAs expected, Planescape: Torment: Enhanced Edition [Official Site, GOG, Steam] has now been announced with a…

Unreal Tournament updated, weapon animations overhauled and AI improvements

Tags: Action, FPS, Free Game, Unreal EngineUnreal Tournament [Official Site] has been updated with much better weapon animations, AI improvements,…

Sumoman, the hilarious UNIGINE-powered puzzle platformer with physics is now out on Linux

Tags: Steam, Puzzle, Platformer, Review, VideoSumoman [Steam] is a brand new and rather hilarious puzzle platformer powered by the UNIGINE engine. It…

Hollow Knight, the fantastic looking action adventure game has a Linux build being tested

Tags: Action, Coming Soon, Platformer, SteamHollow Knight [Official Site], an incredibly stylish action and adventure game recently launched for…

To no surprise the Cossacks 3 Linux version has been delayed once again

Tags: Steam, Strategy, Coming SoonI have it confirmed that the planned Linux version of Cossacks 3 [Official Site] has been once again delayed and…

Snoost, a new cloud gaming service has opened with Linux support, uses Steam's in-home streaming

Tags: Editorial, AppsThis is an interesting one, Snoost, a new cloud gaming service powered by Amazon AWS supports Linux. It uses Steam's in-home…

Day of Infamy is an absolutely brutal first-person shooter you need to play

Tags: Action, FPS, Indie Game, Steam, ReviewWhen it comes to FPS games based on realism, Linux is in shortly supply. Day of Infamy [Steam] is another…