From 1e44a0905ee1faa75fbbf9283445e7d0dfb3e19b Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Sun, 16 Feb 2020 23:17:28 -0500 Subject: Updated footer of 2020-01-13 entry --- www/blog/2020-01-13/index.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'www/blog/2020-01-13') diff --git a/www/blog/2020-01-13/index.html b/www/blog/2020-01-13/index.html index 34a0468..0c9d1d5 100644 --- a/www/blog/2020-01-13/index.html +++ b/www/blog/2020-01-13/index.html @@ -24,17 +24,17 @@ command. I figured I could it could just be a simple bash script that recalls your bash-history and appends it to a file, all things that are incredibly easy to do... or so I thought.

-

Look before you leap

+

Look before you leap

This article is a reminder to myself to test the core functionality first, before decorating your program/script with all those bells and whistles. While I did learn a lot in the process it is always a good to check the basics first.

-

What went right

+

What went right

I actually ended up learning a lot during the development of the (never finished) tool. I had never used getopts inside a script before, which turned out to be extremely intuitive. That was all that went right...

-

What went wrong

+

What went wrong

Literally, everything else that could've went wrong did. The "project" was a single bash script roughly 160 lines long before I found out it wouldn't work. It was a series of flags that @@ -45,7 +45,7 @@ when writing. I tried to allow it so you could default an action to make the CLI intuitive which lead to a messy set of if/elses and switch cases.

-

You can't access un-committed bash history

+

You can't access un-committed bash history

History command in a bash shell commits the history at the end of the session. This makes sense once you know this, there are a lot of reasons saving the commands to file after every execution is probably not the @@ -54,7 +54,7 @@ remember I had to add something to my bash_profile before it would work. I wanted something I could just copy onto a new machine and have access to its functionality.

-

Lesson learned

+

Lesson learned

While developing a tool to help me remember things, I learned something I cannot forget: Test the core, simplest functionality first. Before you do anything validate what you're trying to do will work. @@ -62,8 +62,7 @@ can't do the basics, there is no point.

-- cgit v1.2.3-54-g00ecf