We started producing shows as Today with a Techie 10 years, 8 months, 21 days ago. Our shows are produced by listeners like you and can be on any topic that "are of interest to Hackers". If you listen to HPR then please consider contributing one show a year. If you record your show now it could be released in 27 days.
Introduction to sed - part 5
This episode is the last one in the "Introduction to sed" series.
In the last episode we looked at the full story of how
sed works with the hold and pattern buffers. We looked at some of the commands that we had not yet seen and how they can be used to do more advanced processing using
In this episode we will look at a selection of the remaining commands, which might be described as quite obscure (even very obscure). We will also look at some of the example
sed scripts found in the GNU sed manual.
To read the rest of the notes for this episode follow this link: http://hackerpublicradio.org/eps/hpr2060/full_shownotes.html
- Introduction to sed - part 1: http://hackerpublicradio.org/eps.php?id=1976
- Introduction to sed - part 2: http://hackerpublicradio.org/eps.php?id=1986
- Introduction to sed - part 3: http://hackerpublicradio.org/eps.php?id=1997
- Introduction to sed - part 4: http://hackerpublicradio.org/eps.php?id=2011
- Index: https://www.gnu.org/software/sed/manual/sed.html
- Commands for
- Commands Specific to GNU
- Wikipedia entry for
- "Sed - An Introduction and Tutorial" by Bruce Barnett: http://www.grymoire.com/Unix/Sed.html
- Wikibooks sed wiki: https://en.wikibooks.org/wiki/Sed
- Example files:
- Using the c command: http://hackerpublicradio.org/eps/hpr2060/demo5.sed
- Centring lines: http://hackerpublicradio.org/eps/hpr2060/centre.sed
- Reverse lines of files: http://hackerpublicradio.org/eps/hpr2060/tac.sed
- Reverse characters of lines (original and debug): http://hackerpublicradio.org/eps/hpr2060/reverse_characters.sed http://hackerpublicradio.org/eps/hpr2060/reverse_characters_debug.sed
This was my first show for HPR! I wanted to offer up something unique–hopefully not too much so to enjoy.
In this episode I talk a bit about the differences between how my son will grow up with gaming technology, and how I did. There’s a lot of nostalgia, a little humor, and also a bit of language.
All in-show music was created by me.
This is my 14th Beer Podcast. I know. I know. I've only put two (2) up online so far. But trust me, the other ten (10) are coming. This one's just out of sequence is all.
Oh, yeah. A little other morsel/tidbit for those of you inclined to brew your own. Go to https://www.brewdog.com/diydog and download BrewDog's DIY Dog pdf of all of their brews/beers.
You ask, who's BrewDog? Well, they're two guys and a dog, who in 2005, began home brewing in a garage in North-Eastern Scotland. Two years and countless successes & failures later, BrewDog came howling into the world. Eight years after that - and more than 200 different beers later - they've released the recipe and story behind every single one of those brews.
So, if you've ever wanted to try to brew your own, here's another reason to start.
The following interview is with a young member of the Maker Space and Raspberry Pi community here in the North West of the UK.
You can find more of Josh's work at:
Blackpool Makerspace and LUG
Blackpool Raspberry Jam
I recently heard an HPR Podcast were it was mentioned that Nano was not a real text editor. That somehow VI or Emacs or Kate or Gedit were in some way better than Nano. I just wanted to set the record straight that Nano is a serious editor that has a huge following and a facebook page.
Blather Configuration Part 1: Desktop Management
In this episode I show how to start adding more commands, how to use the language updater script, and how to start doing some basic desktop navigation. I'll show you how to open and quit applications, and how to switch from one application to another using your voice.
For information about installing blather for the first time, as well as the startup script that I use, please refer to episode 0 of this series, which has examples and links for this stuff.
To start using the language updater script, you need to move it or copy it from the blather source code directory into your path (e.g. ~/bin/). To add new commands you will have to edit the main command configuration file:
Commands are configured in a "key: value" pair, where the key is what you wish to say, and the value is the command that will be executed when you say it. We will start out with some very basic ones, but these can be as elaborate as your imagination and scripting skills will allow. You can execute built-in system commands, or you can write your own scripts that will be executed upon the voice command.
Here's an example of a basic desktop application command set:
OPEN CHROMIUM: chromium & GO TO CHROMIUM: wmctrl -a "google chrome" QUIT CHROMIUM: wmctrl -c "google chrome"
The first command launches Chromium, the second one will switch focus to Chromium when you are currently in another program, and the third one closes Chromium. This makes use of the command line tool
wmctrl, which is a very handy window management tool. The
wmctrl -a command chooses which window to put focus on (or close) based on the window title, which in the commands above is given in quotation marks. There are many options to how
wmctrl can find windows and take actions, but for now we will just use this basic option.
Once you have one command set of this kind working as you like, it's very easy to set up additional command sets for all of the desktop applications you use most often.
Some applications are more difficult to handle than others. For example media players typically change the window title based on which track is playing. This makes it impossible to use the static window title option above, so I resort to a bit of scripting to help it find the right window to put focus on or close:
OPEN clementine: clementine & GO TO clementine: rid=$(pgrep clementine -u $(whoami) |head -n 1) && rwinname=$(wmctrl -lp |grep $rid |sed -e "s/.*$rid * //" | sed -e "s/$(hostname) //") && wmctrl -a "$rwinname"
Opening the music player is easy. Switching to it is something else. To make this work I first find the process ID of the Clementine music player, and then I use the
wmctrl list command to list all of the windows that are open and I grep for the process ID that I found in the first part. Then I extract the window name from that command's output and use the result inside quotation marks in the very last command to change Focus to that window. Whew!
One last basic desktop navigation command for this episode. This is one that I use probably more than any other command. What it achieves is the alt + Tab Key stroke, which switches Focus to the previous window. Here's how I do it:
BACK FLIP: xdotool key alt+Tab
This makes use of the wonderful
xdotool package to execute a virtual keystroke. Magic!
It's MeToo here again recording for HPR with a follow on beer tasting podcast. Let me first apologize for the audio quality of this and the next eleven beer podcasts. They were all recorded live on my phone in the Nobody Knows Bar, so there is a bit of a background noise. I just hope it's not too distracting.
The following twelve beer podcasts were recorded over a period of several months. A couple of them, even though they were recorded at the same "sitting", I've chosen to break up into several podcasts, just so as to add more podcasts to HPR.
In a few cases, it's obvious that I get a little tongue tied. Please forgive me. I normally tend to just have one beer per sitting, but the beer is so good and I'm with friends, and as such have had more than one per sitting at those times.
But enough of the explanations and apologies. Let's get on to the heart of the podcast: my impressions of several beers.
One more thing before we start. The beer in this podcast is Old Foghorn. I mislabeled it in the recording as Old Fog.
[Audio from pre-recorded report]
Well. there you have it. Not one of my better recordings. But I hope you liked it nonetheless.
So, this is MeToo here signing out until next time, wishing you happy trails and happy beers.
In this episode of HPR sigflup interviews Linden who specializes in databases. The subject of this interview varies wildly. All the way from databases to python and arch linux
You can contact Linden on twitter at @tesherista
0.40 Computer History
6.25 Linux and Freecycle
8.50 Current PC and Distro
9.10 Helping/converting others