A project I'm involved with has made me think about how there are
always many solution paths for any given problem in the Linux universe. For
this other project, I wanted to cobble together a version of
grep that let
me specify proper regular expressions without having to worry about the
-E flag and get a context for the matches too.
In my last article, "Fancy
Tricks for Changing Numberic Base", I explored the surprising ability of the Linux shell to convert
numeric bases on the fly, including this sweet little snippet that converts
FF hexadecimal into decimal notation:
$ echo $(( 0xFF ))
In this article, I want to cover a more fundamental
aspect of shell scripting: working with command arguments.
I suspect that most shell scripts go through an evolution with their
command flags, a more>>
I must admit that I don't really follow basketball. But, I do like to engage
with folks at work, and every spring I've always felt a little left out
when my work colleagues fill out their NCAA March Madness basketball
brackets. If your office is like mine, it seems everyone gets
very excited to build their brackets and follow the basketball games and
play in an office pool.
For this article, I thought it would be beneficial to go back to some basics of
shell scripting and look at how functions work. Most script writers
probably eschew using functions because it's a bit antithetical to how
scripts tend to evolve, as a sequence of commands on the command line that
are captured in a file.
A reader wrote a letter to me (oh happy day!), and although I'm still
not entirely sure what she's trying to accomplish, it's an interesting
puzzle to try to tackle anyway. Here's what she asked:
In my last article, we began an exploration of date math by validating a given date
specified by the user, then explored how GNU date offers some slick math
capabilities, but has some inherent limitations, the most notable of which is
that it isn't on 100% of all Linux and UNIX systems.
Let's start with some homework. Go to Google (or Bing) and search
for "privacy is dead, get over it". I first heard this from Bill
Joy, cofounder of Sun Microsystems, but it's attributed to a number of
tech folk, and there's an element of truth to it. Put something on-line
and it's in the wild, however much you'd prefer to keep it under