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
#!/bin/bash
# a better atq
#
# returns the original atq output in bold
# AND IN ADDITION, ALSO:
# * 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"
done
}
atq | sort | do_extraqinfo
So, May 25 huh? Geek Pride Day! Or… is it?
The wikipedia article on Geek Pride day lists a “manifesto” of sorts, or a “geek code”(see below) for Geek Pride Day…
…here it is:
Rights:
- The right to be even geekier.
- The right to not leave your house.
- The right to not like football or any other sport.
- The right to associate with other nerds.
- The right to have few friends (or none at all).
- The right to have as many geeky friends as you want.
- The right to be out of style.
- The right to be overweight and near-sighted.
- The right to show off your geekiness.
- The right to take over the world.
Responsibilities:
- Be a geek, no matter what.
- Try to be nerdier than anyone else.
- If there is a discussion about something geeky, you must give your opinion.
- To save and protect all geeky material.
- Do everything you can to show off geeky stuff as a “museum of geekiness.”
- Don’t be a generalized geek. You must specialize in something.
- Attend every nerdy movie on opening night and buy every geeky book before anyone else.
- Wait in line on every opening night. If you can go in costume or at least with a related T-shirt, all the better.
- Don’t waste your time on anything not related to geekdom.
- Try to take over the world!
So, I have a problem with this. Not all of it, and mostly the ‘responsibilities’ section…
But I get ahead of myself. Here is where I disagree…
Read the rest of this entry »
So OK Go are a fun and quirky group, quickly gaining renown for their quirky videos.
How did they get to this point?
Here is my trip down OK Go video discovery lane Read the rest of this entry »
So once again, my quarterly report on the temperature range outside my rack at knee level, and inside my rack at shoulder level – above two machines. Read the rest of this entry »
Now this, I am sure you will agree, is a damn cool presentation of some excellent ideas.
http://www.ted.com/talks/blaise_aguera.html
If you haven’t seen it, then do so now.
If you have, proceed… Read the rest of this entry »
Y2K10? Is that what we’re calling it? Makes sense since 2k1 was claimed by 2001, but it’s not any more efficient on the bytes than 2010. Worse in fact, if the Y requires prepending!
Regardless..
New years resolutions? Out.
New years goals? In. Read the rest of this entry »
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? Read the rest of this entry »
Previously I posted winter temperature ranges in the ThorxBlog post: as hot as…
Here are the spring results
So in 3 months of spring, the ‘indoor’ (outside the rack) temperatures: 14.4 – 33.8C
And the “outdoor” (inside the rack) for the same winter season: 22.6 – 45C
So in short – not too different from winter… a couple of degrees warmer all around… though I bet a bellcurve plot of common temperatures would show a slightly different bias to the story too.
Thermometer reset, and into summer… hello summer!
December 1st, 2009 in
Uncategorized | tags:
computer,
geek |
No Comments
I was recently talking with a friend about commandline prompt gadgetry, and our tangent conversations drifted to 256colour support in X terminal emulators. xterm. gnome-terminal, and presumably kterm and others also, though only the first two have I looked at.
256 colour support is there. It’s in the code. It works. It’s nice. And it’s… not only not enabled by default, there is no clear and simple way of enabling it even if you WANTED TO.
I was going to blog more about this, but the following IRC fragment I think says it all. Any questions?
Read the rest of this entry »
So those that know me should be very well aware that I am a huge Douglas Adams fan, and alongside da Vinci and JDR, consider him a hero. The weekend that he died was one that I count as one of the most horrible in my life (for that and other reasons which coincided)
So I’m wary about extensions to his work.
The movie I enjoyed. I thought it could be better, and some parts truly bothered me, but other parts gave me smiles. I accept it as a HHG movie, but somehow it lacked a vibe.
So this week saw the release of the long-awaited 6th Hitch Hiker’s book, written by Eoin Colfer. I bought it, I have read it. This is my review.
So the first thing I’m going to do is write the positive, but then I’m editing it out to the end of the review, because ultimately, it’s not a book that should be leaving a sour taste in your mouth in reviews.
Mostly spoilerfree review follows
Read the rest of this entry »