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

4 step Network bonding / teaming configuration in Linux

This article explains what network bonding is in Linux.

Recent open source hardware trends, from SBCs to servers

At ELC Europe, Intel MinnowBoard SBC evangelist John Hawley surveyed open hardware trends, and their impact on OS-enabled device and system development.

Peek - A Simple Animated Gif Screen Recorder for Linux

FOSSmint: Peek Gif Recorder is the perfect screen capture tool for short and sharp video clips

What to do when people start hacking your culture

When organizational rules exist, people will try to game them.

How To Instantly Share Files And Folders In Arch Linux

Quickserve is a simple http server that allows you to share files quickly between Arch Linux systems and/or other operating systems.

How to create your own Linux Distribution with Yocto on Ubuntu

HowToForge: In this article, our focus is the creation of a minimal Linux distribution using the Yocto project on the Ubuntu platform.

Inxi - A Powerful Feature-Rich Commandline System Information Tool for Linux

tecmint: Inxi is a powerful and remarkable command line-system information script designed for both console and IRC (Internet Relay Chat).

Thanks To Red Hat, India's Biggest Stock Exchange Is Now The World's Fastest

"Red Hat is now our backbone. Our business cannot run if Red Hat is not there." That is India's biggest stock exchange's CEO talking.

RPi-friendly home automation kit adds voice recognition support

 LinuxGizmos: Matrix Labs launched an Indiegogo campaign for "Matrix Voice," a voice input board that works standalone, or in conjunction with a Raspberry Pi or UP SBC.

GamingOnLinux.com Latest Articles

Feral Interactive will livestream DiRT Rally on March 1st

Tags: Feral Interactive, LivestreamFor those wanting to see DiRT Rally on Linux for the first time ever, Feral Interactive will be doing a livestream…

Looks like the Serious Sam 4 release date may have been shown in an 'easter egg'

Tags: Action, Coming Soon, FPS, SteamInside Serious Sam VR: The Last Hope is an 'easter egg' that may give the release date of Serious Sam 4. This is…

Reminder: Update your PC info for the next round of statistics updates

Tags: Site Info, SurveyThis is your once a month reminder to make sure your PC information is correct on your user profiles. A fresh batch of…

Aspyr Media confirm the 'Australian Summer' Civilization VI update should be on Linux in 'a matter of weeks'

Tags: Aspyr Media, Coming Soon, DLC, Strategy Today the 'Australian Summer' update landed for the Windows version of Civilization VI [Steam], but the…

Northgard, a great looking strategy title will come to Linux after Early Access

Tags: Early Access, Steam, StrategyThe developers of strategy game Northgard [Steam] have confirmed their plans for a Linux version, they already…

Friday Livestream with Samsai at 6 PM UTC!

Tags: LivestreamThe time has come once again! I welcome you to our weekly Friday Livestream where we will play games and talk nonsense for a bit over…

The latest elusive target is live in HITMAN, including in the Linux version

Tags: Feral Interactive, Stealth, SteamThe latest elusive target in HITMAN [Steam] is now available to try and take down! The good news is that Feral…

Entroware have unleashed the 'Aether' laptop for Linux enthusiasts featuring Intel's 7th generation CPUs

Tags: HardwareEntroware, the UK-based Linux hardware vendor have released a new laptop named 'Aether' and it's quite the little beast. Entroware are…

Security: You might want to change passwords on sites that use Cloudflare

Tags: MiscNot gaming news, but still important to get across. Cloudflare has written a blog post detailing a security issue that was identified which…

Angels with Scaly Wings, a visual novel that's actually not bad at all

Tags: Review, Visual Novel, Steam, Indie GameIf you need to know something about me, it's that I usually hate visual novels with a passion. They…

Wells, a steampunk run and gun game released for Linux and I took a look, it's not good

Tags: Action, Steam, Indie Game, ReviewToday I tried to play Wells [Steam], a new steampunk run and gun action game, but sadly the experience wasn't…

SuperTuxKart is trying to get on Steam, be sure to give it a vote

Tags: Open Source, Steam, Racing, GreenlightThe open source racer SuperTuxKart is aiming to get on Steam before Greenlight is closed, so be sure to…

Crusader Kings II - Monks and Mystics DLC announced

Tags: Coming Soon, DLC, Steam, StrategyParadox are going to give some fresh life to Crusader Kings II with a new DLC named 'Monks and Mystics'…

Serious Sam VR: The First Encounter is now officially on Linux

Tags: Action, FPS, Steam, Virtual Reality Croteam being awesome as usual, as promised Serious Sam VR: The First Encounter is now officially on Linux.…

Valve have announced 'Steam Audio' an SDK of advanced audio tools, it will support Linux

Tags: Steam, ToolkitValve have ripped the lid off their latest project named 'Steam Audio', an SDK of advanced audio tools that will support…