SubString in Bash

This is a note for myself.

I have a string “version=1.234.5” and I want to get the value after the equal and keep the value in a variable. Here is what I have done.

 test_str="version=2.150.2"
 echo $test_str
 ver=${test_str##*=}
 echo $ver

In addition, if I want to retain the part before the equal…

key=${test_str%=*}

Bash looks so cryptic… I use it for wherever necessary but not my favorite language.

What makes you a good engineer?

I’ve always wanted to be a good engineer. I consider myself a “good enough” engineer but maybe not a good engineer yet. I’m going to list the qualities for good engineers below.

  • Technical knowledge
  • Communication skill
  • Programming skill
  • Networking knowledge
  • Security knowledge
  • Meticulousness
  • Curiosity
  • Respect for others
  • Open-mindedness
  • Documentation skills

I’m sure someone can add more to this list but that’s what I think of right now. As I see them now, I am far from my ideal engineer…

One day, when I was watching a technical YouTube channel, this guy said that to be a good engineer, you have to be somewhat jerk. I guess he meant it takes being aggressive without a fear of hurting someone’s feelings to get things done, but I don’t really agree with him. I believe if you are a truly good engineer, your communication skill is very good to a point where you can nicely persuade your fellow engineers. I have met such engineers that I respect and keep in touch even now.

Technical skill is the most important one to be a good engineer but that’s not all that it takes. We are all humans before we are engineers. We ought to remember that.

Switched to Linux Mint

I did some OS hopping in the past. I have been a long time Windows user and then I switched my home machine to Mac about a more than decade ago. Mac switch was just out of my curiosity as an engineer. I wanted to see what Steve Jobs and his people were secretly cooking. It took me about a year to get really familiarized with the environment and I’m glad I did.

On the side, I had been installing multiple Linux distros on my VMWare Fusion. I knew they were more than viable solutions, but I wasn’t so sure as a desktop OS. GNOME, Mate, KDE and there are multiple desktop environments in the Linux world but I wasn’t convinced to really switch.

As of now I have switched my main desktop environment to Linux Mint. I tried Ubuntu GNOME and Mate but I like Linux Mint better. I hear good things about Arch and some other distros but the main purpose me using my computer is coding not spending so much time just to get my environment up and running, so Linux Mint makes the most sense to me.

I love the UI and I’m pleasantly surprised by how sophisticated it is. Of course, a lot of core stuff inherits from Ubuntu which also inherits from Debian and without the “forked” projects, there wouldn’t be no Linux Mint. I think it’s the beauty of open source projects.

I have also installed VMWare Workstation Pro which allows me to host Windows and other OSes as necessary. I do have a Windows 10 VM up and running on it as I still need Windows for some things.

I spent pretty much the whole weekend to do my research and my experiments to create the environment. I’m quite happy with what I have got and excited to explore more in this environment.

Virtualization

If you are in tech industry, it’s hard not to use virtualization. If you are a little bit technically savvy, virtualization comes in really handy.

This post is a little bit of me just reminiscing the old days… Everything used to run on physical machines. I remember using Ghost for backing up computer images and restore them on physical machines. It’s still a viable solution but virtualization makes it so much easier.

If you want to save a state of a computer, just hit the “snapshot” button. You can always go back to where you were.

Now that I’m building an Ubuntu environment, I’m starting to use VMWare Workstation 15 Player. This is a free product for non-commercial use that allows you to create virtual machines. I had been a VMWare Fusion (for Mac) customer for more than 10 years so I thought I would give it a try and I’m happy I did. I may purchase a Pro version license down the road.

Though I love what Ubuntu (Canonical) has done for the Linux world and I want to use their environment as my main environment, I feel that I cannot give up Windows 100% because it’s still a defacto-standard OS and there are some applications that requires Windows 10. I should keep my option to be able to do things on Windows. VMWare totally makes it possible.

Archer T9UH on Ubuntu

I’m trying to dual boot my main desktop at home. I want to use Ubuntu as my main desktop but I can’t totally give up Windows 10. I have been able to dual boot these 2 OSes but it took me a while to get my Archer T9UH to work on my Ubuntu so here we go.

As of today (2/1/2019), my Ubuntu version is the following.

Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

The Linux kernel is 4.15.0-45-generic. It’s the latest and when you just plug it, it doesn’t work at all. I happened to have a WiFi adapter that just worked with Ubuntu and I ran the following steps.

  1. Open terminal.
  2. git clone git@github.com:zebulon2/rtl8814au.git If you don’t git installed yet, install it by running sudo apt install git (Thanks zebulon2!)
  3. Execute make clean
  4. Execute make
  5. Execute sudo make install
  6. Execute sudo reboot

I’m not so familiar with how this driver with Archer T9UH works. I tried to download their beta driver but it didn’t compile at all, so I had to look around to get it to work on the latest Ubuntu.

Hope this helps someone out there. 🙂