Tag Archives: interface

but that was my $HOME

  • I’m a linux user …In fact, I’ve been using linux for a long time – my first account on a Linux box was at least a year before 1.0 came out.
  • I’m a bit of a hoarder …arguably more than a “bit”, actually.

Combine these two points, and I can point to dotfiles in my $HOME directory that date back over a decade. In fact, the oldest four date to 2001… Continue reading

building a better atq

I was frustrated at the poor information available by atq (what’s that? You’ll tell me WHEN you’re running stuff, but not WHAT you’re running? This seems a little out of order!)

In fact, atq is literally out of order – I guess the idea is that you pipe it through sort. very very old-school thinking :)

At the other end of the scale, at -c provides an information overload of EVERYTHING about the job. (60+ lines of env? yikes. I don’t need to know that most of the time!)

So where is the simple and useful summary that I’d genuinely expect of atq?
ie, not only the queued command times, but WHAT those commands are – one per line.

As a result, here is my simple “batq” – a better atq :)


# a better atq
# returns the original atq output in bold
# * returns items sorted
# * the intended working directory
# * the command to be run
        # TODO:
        # $command is not robust - will fail on multiple lines

function do_extraqinfo() {
    while read job ; do
        jobid=$(echo $job | awk '{print $1}')
        detail=$(at -c $jobid)
        dir=$(echo "$detail" | egrep ^cd | sed -e 's/cd \(.*\) || {/\1/g')
        command=$(echo "$detail" | tail -1)
        # alter the following line if the bold offends you
        tput bold ; echo -n "$job" ; tput sgr0
        echo "  $dir    $command"

atq | sort | do_extraqinfo

Subway voting…

I recently had pause to use Subway machines to choose my lunch. Which bread did I support (Dear Subway. Bring back Parmeson-Oregano bread. If you do not, I cannot respect your advertising campaign based on the concept of “choice”), which fillings match my views, and which condiments are just “me”. It gave me a paper receipt, and I had food. (it was tasty)

So. Why can’t we have a voting machine to do this? Continue reading