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

Articles found under tag: scripting

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

Split a table and number the pieces: two methods

By

I worked on these bits of code to simplify a shell script of mine. You really wouldn't want to see the script's original commands here — they're way too ugly! The new commands are much prettier and work well. The problem To simplify the story, here's a comma-separated table called demo, sorted on t…

Read Article

News Elsewhere

Linuxtoday.com

Maintaining remote web sites with sitecopy on Ubuntu 16.04

 HowToForge: sitecopy is a tool for copying locally stored web sites to a remote web server (using FTP or WebDAV)

How I use Linux for theoretical physics

While writing his master's thesis, Jonas gained access to a workstation running Scientific Linux, and a cluster system with a few hundred cores.

Intro to LimeSurvey: An open source, feature-rich polling platform

If you want a robust, customizable polling platform with features for complicated surveys and a useful statistical analysis and summary system, then check out LimeSurvey.

Preventing the next Heartbleed and making FOSS more secure

David Wheeler is leading a new project, the CII Best Practices Badging project

Mozilla's Dave Herman on Building an Open Source Research Lab

 FOSSforce: Open source organizations find the methodology behind open source software development also works well in other areas of the organization as well.

7 Best Markdown Editors for Linux

Markdown is a simple and lightweight tool written in Perl

Blockstream Has No Patents, But Pledges Not to Sue Using Patent

 techrights: Blockstream says that it comes in peace when it comes to software patents, which triggers speculations about coming Blockchain patent wars

EncryptPad: Secure Text Editor That Protects Files With Passwords, Keys, Or Both

EncryptPad is a free and open source text editor for sensitive information, which protects files with passwords, key files, or both, available for Linux, Windows and Ma

Feral Linux users should learn

Feral Linux users who are slamming Microsoft for this and that after it released an alpha version of Skype for Linux are part of the reason why the needs of desktop Linux users are not taken seriously.

GamingOnLinux.com Latest Articles

Sinner’s Sorrow, a grim looking action adventure is coming to Linux

Tags:Action,Adventure,Coming Soon,Indie GameI don't have a freaking clue what's going in the teaser trailer for Sinner's Sorrow, but wow am I…

openFrameworks C++ toolkit now has a Vulkan backend that supports Linux

Tags:Vulkan,ToolkitI'm going to be honest, I had never heard of openFrameworks until today. It claims it's a C++ toolkit that glues together several…

Vulkan backend for the Dolphin emulator is now feature complete

Tags:Emulation,Open Source,VulkanOn the github pull request to bring in the Vulkan backend for the Dolphin emulator, it now reads as feature…

Dave Airlie has been working on an AMD Vulkan driver

Tags:Drivers,AMDDave Airlie has been working on an open source AMD Vulkan driver and he's ready to show it off a little bit. I do love the fact that…

Looks like the open source Mesa driver has hit OpenGL 4.5 support with Intel

Tags:Drivers,Open SourceA pretty incredible milestone for open source graphics, as it appears that Mesa along with the Intel driver has hit OpenGL…

The Living Dungeon developers looking to see if there's interest for a Linux version

Tags:Adventure,Steam,StrategyThe Living Dungeon developers have posted on Steam requesting to see how much interest there is for their game on Linux.…

The Wine Development Release 1.9.15 Is Now Available

Tags:Beta,Open Source,Wine The Wine team released today another development release of their software. Version 1.9.15 has many small changes…

Knights of the Sky and Dungeon Souls are now available DRM free on GOG

Tags:Indie Game,GOG,DRM Free,DOSBoxGOG.com have added in two more Linux titles for your DRM free collections! Dungeon Souls, a pretty cool action…

Hidden in Plain Sight, a local multiplayer game that sounds hilarious is now on Linux

Tags:Action,Casual,Indie Game,SteamHidden in Plain Sight is a rather amusing sounding local multiplayer game. You have to blend in with a crowd on…

Starbound officially released!

Tags:Survival,Steam,Sandbox,RPG,GOGThe day I feel like I have been waiting on for an eternity is here. Starbound is now at the big 1.0 release and…

He's back, he's also a bit sick and he's hosting the Friday Livestream at 7.45 PM UTC!

Tags:LivestreamSurprise, I'm finally back! As some of you might know, I have been sitting in the Finnish Defence Forces the past 3-ish weeks but I…

System Shock remake has blasted past the Linux stretch goal, officially coming to Linux

Tags:RPG,Horror,FPS,Crowdfunding,Action I am sure this will be good news to many of you! The System Shock kickstarter has now blasted way past the…

Terraria 1.3.2 released, time to party with new items

Tags:GOG,Sandbox,Steam,Survival Terraria 1.3.2 has been released and along with an assortment of bugfixes it includes some fun new items. Having a…

SWORDY, a local party brawler could come to Linux if Microsoft allow it

Tags:Steam,Early Access,ActionSWORDY is a rather fun looking local party brawler that has just released on Steam in Early Access. It could see a…

Life is Strange released for Linux & SteamOS, some thoughts and a port report included

Tags:Steam,Review,Feral Interactive,Adventure Life is Strange is a story rich game I’ve been wanting to play ever since I first saw it and now,…