You are here

documentation

Comparing Strings in the Shell: Pattern Substitution Operator

One problem with using the truncate operator for string matching is case matching.

In the truncate operator example, ${foo%%*ATE} matches SENATE.


DALEK$ foo=SENATE
DALEK$ if [ '' = "${foo%%*ATE}" ] ; then echo "$foo! $foo!"; fi
SENATE! SENATE!
DALEK$

It will not match Senate because ate and ATE are different cases.


DALEK$ foo=Senate
DALEK$ if [ '' = "${foo%%*ATE}" ] ; then echo "$foo! $foo!"; fi
DALEK$

Comparing Strings in the Shell: Truncate Operator

While creating materials for my bash class I needed to create some globbing exercises for my students.

It occurred to me that a string operator and a comparison to the null string can be used to check if something is a substring of another value.

Sure, you can use Substring Expansion to see if the substring is at a known location such as "Does the value of $foo start with 'bar'?", but length and location are often unknown.


$ foo=barfood
$ if [ 'bar' = "${foo:0:3}" ]; then echo $foo; fi
barfood
$

LibrePlanet 2018 Experience

LibrePlanet, the Free Software Foundation's annual technology conference, was a great experience in March.

The conference started with a fantastic keynote from Deb Nicholson, "Free software forever."

Tübix Community Conference in Southern Germany

I went to my first Tübix this year. Tübingen is a beautiful college town ( Universitätsstadt ) on the Neckar river in southwestern Germany.

I particularly enjoyed the talks on SSH and authentication, both of which led into my talk on privacy and security via a password manager. I picked up a couple new ways of explaining things from the SSH talk and look forward to listening to it again.

PLUG July East Valley Meeting Wrapup

Thursday's PLUG meeting for July went well. We had a large crowd for mid-summer including lots of new faces.

Announcements included an opening for teaching electronics at a local community college. The department head showed up, so I handed it over to him for descriptions of the classes and what they need. He's adamant about a GNU/Linux infrastructure being vital to the success of the program and has hired 4 previous instructors from PLUG.

Online Privacy and Security Using a Password Manager

[This is an article I wrote for Linux Journal]

Internet and cloud companies do not have perfect security. We're all familiar with large scale data theft from big corporations. While most do a great job considering the attacks against them, you can do your part by protecting your own accounts.

It's common wisdom to use a different password for each account. Better yet is using a unique email address as well. That quickly becomes unwieldy, so we need an external brain.

Tübix times two

Tübix has kindly accepted two of my proposals for the beginning of June conference in Tübingen, Germany.

In the morning I will be showing uMatrix, a privacy and security webextension browser add on. Via a simple interface uMatrix allows personal rules for website cookies, JavaScript, CSS, pictures and video.

In the afternoon I will be speaking on privacy and security via better control o
f account credentials and private data.

Both talks will be in German. The conference is in German and Schwäbisch.

Personal Online Security, Privacy, and Password Management for Ubucon at SCaLE 16x

My "Personal Online Security, Privacy, and Password Management" for Ubucon at SCaLE is tomorrow.

I'm looking forward to giving the presentation in conjunction with SCaLE. It was popular when I gave it at Linuxfest Northwest a couple years ago and the many times I've given it for local groups.

Last year Linux Journal used my article as the cover story. The article was based on the presentation I will be giving at Ubucon.

Pages

Subscribe to RSS - documentation