Blog posts tagged "shell"
-
Genres, cuids and a bit of AWK
Using AWK to process the Genres data from the CAP bookshop sample.
-
Auto formatting extensionless Bash scripts in Neovim
Here's what I did to make the combination of the Bash language server and shfmt work with Editorconfig settings for Bash script files that don't have extensions.
-
Point free coding and function composition
In this post I explore and show examples of the concepts of point free coding, of chains of functions through which data flows, and of function composition.
-
How I run executables in containers
Here's a quick post explaining how I might typically containerise an executable. This is in the context of my aim to not "pollute" my base OS (at the bare metal level) with any installs, as far as I can, as well as to remain platform independent and abstract.
-
Migrating GitHub issue based URL bookmarks to wallabag
In this post I outline how I migrated my collection of reading list bookmarks, stored as issues in a GitHub repo, to wallabag which I'm now self-hosting.
-
New source for LXD images on Crostini
Finding a new source for LXD images on ChromeOS Crostini after the default became unavailable.
-
Using lazydocker with SSH-based remote contexts
A quick hack to work around the current issue with lazydocker and SSH-based remote Docker context definitions.
-
Obtaining auth code grant type OAuth 2.0 tokens for Google APIs with a script
Writing a script to obtain OAuth 2.0 bearer tokens for Google API calls using the auth code grant type.
-
Simple script for previewing CDS models in CSN - cdsray
Building a simple cdsray script for previewing CDS models in their CSN representation.
-
Improve your CAP dev container shell prompt
Improving the shell prompt in a CAP dev container for a better development experience.
-
Opening files from the terminal in BAS dev spaces
Opening files from the terminal in SAP Business Application Studio dev spaces using the code command.
-
A simple jq REPL with tmux, bash, vim and entr
Building a simple jq REPL with tmux, Bash, Vim and entr for exploring JSON datasets.
-
Using the docker CLI in a container on macOS
Explaining how to use the Docker client CLI from within a container on macOS.
-
Bash shell expansion inside double quotes
Exploring which Bash shell expansions still work inside double quotes in the context of an API challenge.
-
OData query operations and URL encoding the system query options with curl
Using curl to send OData query operations with system query options that contain whitespace, letting curl handle the URL encoding.
-
Improving my interactive jq workflow with ijq, bash and tmux
Improving my interactive jq workflow by capturing expressions from ijq for command line use.
-
Bash notes 3
Discovering more Bash language features from community solutions to Exercism exercises.
-
A classic example of yak shaving, and some stream editing
Descending through multiple levels of classic yak shaving and ending up learning some stream editing.
-
Bash notes 2
Picking up more Bash insights from Exercism solutions including case statement features.
-
Bash notes
Learning a few things from reading through a neat solution to a Bash track exercise in Exercism.
-
Exercism and jq
Exploring what a jq track might look like on the Exercism learning platform.
-
Boosting tutorial UX with dev containers part 2 - embedding prerequisite details
Working through each tutorial prerequisite step and encoding the tools and configuration into a Dockerfile and devcontainer.json file.
-
Truncation and neat terminal output
Exploring the psFormat Docker configuration option and striving for neat terminal output.
-
Controlling Chrome from the CLI
Using the chrome-cli tool to open URLs in different tabs from the command line.
-
Getting BTP resource GUIDs with the btp CLI – part 2 - JSON and jq
Exploring how the btp CLI supports JSON output and how to parse it with jq.
-
Getting BTP resource GUIDs with the btp CLI - part 1
Learning how to use the btp CLI to determine resource GUIDs in a BTP global account.
-
Exploring fff part 2 - get_ls_colors
Continuing to read and learn from the fff file manager source code, focusing on the get_ls_colors function.
-
Sourcing vs executing in Bash
Checking the value of $0 to determine whether to source rather than execute a script.
-
Using functions more
Exploring the benefits of using Bash functions more as a sweet spot between aliases and scripts.
-
Improving shell fu with practice
Practising shell commands to improve my skills and expose myself to new knowledge.
-
Exploring fff part 1 - main
What I learned from starting to read the source code of the fff file manager, focusing on the main function.
-
Learning by rewriting - bash, jq and fzf details
One of the ways I learn is by reading and sometimes rewriting other people's scripts. Here I learn more about jq by rewriting a friend's password CLI script.
-
Unix tooling - join, don't extend
Reading a 1984 paper by Pike and Kernighan helped crystallise an important axiom in Unix tool design about joining programs rather than extending them.
-
Early thoughts on Warp
Some very early thoughts on Warp, the pro terminal designed for everyday use.
-
Unpacking Bash shell tips from a GitHub Actions workflow
Unpacking Bash shell tips from a GitHub Actions workflow step, focusing on IFS and awk usage for pull request info.
-
GitHub Actions workflow browser
A simple workflow browser built with Bash, gh and fzf to help refer to previous workflow definitions while writing new ones.
-
Producing JSON with jq for appending issue titles
Learning how to use jq to produce JSON while writing a script to enhance Thinking Aloud journal entry titles.
-
Two-phase video uploads with YouTube API and curl
How to use the YouTube API to upload a video with curl using a two-phase approach.
-
Mass deletion of GitHub Actions workflow runs
A simple cleanup script for mass-deleting GitHub Actions workflow runs using gh, jq, fzf and the GitHub API.
-
Aborting a script with parameter expansion
Using the :? form of shell parameter expansion to abort a script if a required parameter value is not set.
-
fzf - the basics part 2 - search results
More on the fzf basics, this time focusing on controlling and understanding the search results.
-
fzf - the basics part 1 - layout
What I learned from reading the first part of the fzf README about controlling the layout and appearance.
-
Columnar layout with AWK
A breakdown of a simple AWK script to format values into neatly aligned columns.
-
Waiting for jobs, and the concept of the shell
How Bash's wait builtin deepened my understanding of Bash scripting as a language.
-
Implicit values in Bash for loop construct
Bash's for loop construct can use implicit values by iterating over the positional parameters when no list is specified.
-
The myriad meanings of pwd in Unix systems
Exploring the myriad meanings of pwd in Unix and Linux systems based on a Twitter poll with varied results.
-
The subtle art of quoting newline characters
How backslash continuation in the shell is more subtle and more beautifully shell-like than it might first appear.
-
Case modification operators in parameter substitution
In addition to the usual ways of uppercasing strings, Bash 4 brought case modification operators to the parameter substitution family.
-
MID$ and shell parameter expansion
The rich and varied abilities in Bash for accessing and manipulating values in variables through shell parameter expansion.
-
Understanding declare
Exploring the Bash builtin declare, its relationship to typeset and local, and how it can be used to set variable attributes.
-
Desnowballification with set -o errexit
Using set -o errexit at the start of scripts to make them more robust and prevent error snowballing.
-
Improving my shell scripting
I'm using a style guide along with the shellcheck and shfmt tools to help me improve the quality and consistency of my shell scripts.
-
curl and multipart/form-data
Discovering how curl handles multipart/form-data including reading from standard input.
-
Checking a command is available before use
Learning a useful pattern for checking whether a command is available before using it.
-
Using exec to jump
Exploring how the exec builtin in Bash replaces the current process with a new one.
-
A new learning source for shell scripting
Discovering Mr Rob's dotfiles and live streams as a new learning source for shell scripting.
-
Shell parameter expansion with :+ is useful
Using the shell parameter expansion form :+ for expanding optional values.
-
You can mask sensitive hostnames with wildcards and host aliases
The HOSTALIASES feature works well when combined with wildcard host definitions in SSH config to mask sensitive hostnames.
-
The open square bracket [ is an executable
In a shell script, the open square bracket symbol is not syntax but an executable.
-
Remote mount setup on the Raspberry Pi
Setting up mount points on a Raspberry Pi for connecting to an Apple Airport Time Capsule and Google Drive.
-
Terminal Tip: a CF remote monitor script
Building a script to find and remotely monitor an ongoing Cloud Foundry multi-target app deployment.
-
Terminal Tip: remotely monitor a CF deployment
Remotely monitoring an ongoing Cloud Foundry MTA deployment from the terminal.
-
Terminal Tip: switching CF targets
Switching between Cloud Foundry targets efficiently from the command line.
-
Terminal Tip: parsing CF app logs
Parsing Cloud Foundry application log output with shell tools for better readability.
-
Terminal Tip: truncating CF output
Truncating wide Cloud Foundry CLI output to make it more readable in the terminal.
-
Initial Pi configuration via Ansible
Performing initial configuration of the freshly booted Raspberry Pis using Ansible.
-
Finding the Pis on the network
How to find freshly booted Raspberry Pis on the network so they can be configured further.
-
Mini adventures with MTAs and the Cloud Foundry CLI
Exploring MTAs and shell pipeline techniques with the Cloud Foundry CLI.
-
Scripting Cloud Foundry activities in trial
Sharing a script for recreating my Business Rules environment in the Cloud Foundry trial using the CLI.
-
Shell power and simplicity
Reflecting on the often overlooked power and simplicity of shell programming concepts.
-
Scripting the Workflow API with bash and curl
There's an API for the SAP Cloud Platform Workflow service. Let's explore!
See all tags.