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

ArchStrike Ethical Hacking Linux Operating System Gets Its First ISO Builds

 softpedia: ArchStrike was previously known as ArchAssault, of course, still based on the renowned, lightweight and highly customizable Arch Linux distribution.

GNU Linux-libre Kernel 4.7 Officially Released for Users Who Want 100% Freedom

GNU Linux-libre 4.7-gnu contains deblobbing changes for various included drivers in the mainline Linux 4.7 release.

Configuring a single Ubuntu installation as a dual-boot option and a VirtualBox appliance under Windows 10

 HowToForge: I often need to use Windows 10 and Ubuntu on the same machine within a single login session, so I run Ubuntu as a virtual machine in Oracle VirtualBox.

Fluxday: A no-fuss open source productivity tracker

Unni Koroth shares why his company created open source productivity tool Fluxday.

5 reasons system administrators should use revision control

Check out these five tips for using revision control in operations.

Our First Look at Linux Mint 18 Cinnamon

 FOSSforce: It's been almost a month since Linux Mint 18 "Sarah" was released, so we decided to take it for a spin and have our first ever look at the Cinnamon desktop.

Women In Tech: Jane Silber, CEO Of Canonical

TomsHardware: Silber has been running Canonical (maker of Ubuntu, among a great many other software products) in one form or another for well over a decade at this point

Solus Project to No Longer Offer a Release Schedule, Solus 1.2.1 Gets Delayed

 softpedia: The announcement follows the recent news of Solus becoming a rolling release operating system

GamingOnLinux.com Latest Articles

7 Mages brings a touch more of traditional dungeon crawling to Linux

Tags:Adventure,RPG,SteamControlling a party of adventurers, exploring dungeons and fighting weird magical creatures is an RPG tradition as old as the…

Physics-based 3D puzzler Human: Fall Flat released on Steam for Linux

Tags:Steam,Puzzle Human: Fall Flat is an open-ended physics puzzler with an optional local co-op mode, developed by No Brakes Games, and available…

Stardew Valley is now in beta for Linux

Tags:Steam,Simulation,Coming Soon,BetaUpdate: It now seems to be live, I was able to download it and play it. Here's the password and link to the…

Auto-Staccato looks like a great new take on rhythm games

Tags:Action,Greenlight,Indie Game,Music,SteamAuto-Staccato is a new action rhythm game coming to Linux and it's trying to get on Steam. Think of…

Fancy playing Quake with the Vulkan API? Now you can

Tags:Open Source,VulkanI'm a little late on reporting this due to being ill, but Quake has been ported to Vulkan and it's open source of course.…

FOX n FORESTS, a very interesting looking 16-Bit style action platformer is on Kickstarter

Tags:Retro,Platformer,Interview,Editorial,DRM Free,Adventure,ActionFOX n FORESTS, a 16-Bit style action platformer that has adventure and puzzle…

Beat Cop, the retro pixel art adventure game has a new trailer

Tags:Adventure,Coming Soon,RetroBeat Cop is a rather interesting looking 80s inspired pixel art adventure game due out later this year, and it…

Vikings – Wolves of Midgard Announced from Kalypso Media and Games Farm with Linux support

Tags:RPG,Coming Soon,Action,Unity3DKalypso Media really are getting Linux friendly aren't they! Vikings – Wolves of Midgard has been announced…

The Battle for Wesnoth, the great open source fantasy strategy game is now on Steam Greenlight

Tags:Greenlight,Open Source,Steam,StrategyThe Battle for Wesnoth is probably one of the all time great open source games. It's been around for a long…

Progress on our User Statistics Page has continued, feedback requested

Tags:Site InfoUpdates will be listed at the bottom as I go. Since I am sick with Tonsillitis I decided to take a quick break from news and work on…

Cheese Talks: Porting Games to Linux & Day of the Tentacle

Tags:EditorialHi people! A new Cheese Talks article just went live! This time, I'm looking back at what I learned from porting Day of the Tentacle…

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…