Below you will find pages that utilize the taxonomy term “Bash”
Posts
Session aliases with tmux
I use tmux as my screen multiplexer, and in the past, I used control-A d to disconnect and tmux a -d to reattach to the session. This gets cumbersome if I haven’t created a tmux session yet, since tmux a -d will give me an error that no session exists.
Aliases to the rescue To help start sessions, and now name them, I use the following alias:
alias tma="tmux new -ADs" To create a session named main or re-attach to a disconnected session, I can now type tma main.
read more
Posts
💾 Saving bash history across terminals
I’m very comfortable with bash, and I use it a lot with tmux. However, I didn’t like how I would lose command line history across these multiple terminals. After doing a little research, I figured out how to save my history for each terminal. Not only that, but I can also search all of the history. Now I don’t lose commands!
Setting up your .bashrc Here are the relevant lines from my .
read more
Posts
⌨ Update to my Hugo publish.sh script
I ran in to a little issue with my publish.sh script that I use to automatically publish my site with Hugo. I wipe out the public folder and then rebuild the site with Hugo. After that is done, the public folder is synced to the web host, using the --delete option. The problem arises if Hugo encounters an error. The site isn’t rebuilt but the now empty public folder is synced, wiping out the website.
read more
Posts
🛠️ Tools for working with plain text files - My Plain Text Journey Part II
This is part of a series 📃 My journey into the plain text life - Intro 🛠️ Tools for working with plain text files - My Plain Text Journey Part II 🗃️ Syncing my notes - My Plain Text Journey Part III 📝 Journaling - My Plain Text Journey Part IV ✍ Keeping Notes My Plain Text Journey Part V ✔ Tasks and To Dos My Plain Text Journey Part VI To work with my files in plain text, I use the following tools.
read more
Posts
📟 Updates to my autosched script to schedule posts with Hugo
A couple of weeks ago I posted how I schedule posts with Hugo. At the time, I had two scripts. The first one automatically selected the next day to schedule, while the other script let you pick the day. I’ve now combined the two. Here you go, the finished autosched:
#!/bin/bash # Set these to where you want the posts to go and where you # want to archive the posts postsdir="${HOME}/Web/gozgeek.
read more
Posts
💻 Scheduling and automating posts in a Hugo site
I’ve been working on a new little geeking site over at GozGeek.com as a way to share little geeky things I find on the internet and also write about my own geekspirations. Previously I would have created the site in Wordpress, but I wanted to learn Hugo so that’s what I used. One feature I use a lot in Wordpress is the scheduling of publishing posts, so I had to figure out how to do this in Hugo.
read more