Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
In this article, I will attempt to convince you that Expect is an extremely underappreciated tool for automating terminal applications in Unix.
Visit blog.robertelder.org → On Hacker News Aug 2015 – Aug 2024
Software Engineering 15Tools & Productivity 10Hardware & Electronics 5Systems & Performance 4Programming Languages 3Math & Algorithms 2
In this article, I will attempt to convince you that Expect is an extremely underappreciated tool for automating terminal applications in Unix.
If you don't you're not alone. Right now, as I'm typing this, 4 of the top 4 Google results for "find command linux" contain at least one example of the pattern illustrated by the command above.
Updated Oct 27, 2016: Fixed sample code comments in coroutine example as per suggestion , edited text to note D's similar behaviour .
The purpose of this article is to show you step-by-step examples of how to use the Fourier transform algorithm to multiply two numbers. The primary advantage of using fourier transforms to multiply numbers is that you can use the asymptotically much faster 'Fast Fourier Transform algorithm', to achieve better…
I just finished updating my C compiler and minimal CPU specification to include virtual memory. The process of adding virtual memory support to a CPU, a kernel, and a compiler toolchain has made me realize that there is a lack of good explanations for how all of these parts fit together. I also realized that a…
Over the last 18 months, I've taken the time to create 108 short YouTube videos that summarize all of the commands that are found in the Coreutils Package . These videos focus mostly on Coreutils v8.3, but also included are a few commands from v9.0 as well. For each of the blog posts, I've adapted and modified the…
This article is about how to use the 'tail' command. Here is an overview of how you can use the 'head' and 'tail' commands to output different parts of a file:
Last Updated Dec 12, 2019: Fixed an off by one error (awk uses 1-based arrays!).
An interface can be thought of as a contract between the system and the environment. In a computer program, the 'system' is the function or module in question, and the 'environment' is the rest of the project. The interface formally describes what can pass between the system and the environment. An 'implementation'…
This article is dedicated to discussing why it's so hard to detect the 'key up' or 'key release' event in a Linux terminal environment without relying on X server. Several techniques and code examples will be shown that are capable of detecting the keyup event on Linux (with and without an X server), but all…
Which is the first answer to the first question if you search for 'sort a list' on Stack Overflow (which was answered by Devin Jeanpierre ).
In my attempts to learn the C programming language well enough to write my own C compiler , I've encountered some very interesting examples of C syntax that you generally don't see every day. All of these examples you'll see here will compile without warnings or errors even with very strict compiler flags in gcc and…
Updated 2018-01-21: Added clarification related to assertion about lack of context free nature of the C preprocessor.