Adding a -p option to touch

I’ve sometimes wished that the UNIX touch command had the same -p option as mkdir. With a little bit of scripting, it can:

#!/bin/sh

mkdir="/bin/mkdir"
touch="/usr/bin/touch"

for arg in $*; do
    if [ "$arg" = "-p" ]; then
        opt_p=true
        continue
    fi
    if [ "$opt_p" = "true" ]; then
        $mkdir -p $(dirname $arg) && $touch $arg
    else
        $touch $arg
    fi
done

Scrybe

Check out the demo video. As Darth Vader said, “Impressive. Most impressive.”

Scrybe is an upcoming Web application for organizing – calendaring and such. It seems to have a very nice interface with some really interesting new ideas and some interesting tricks that allow it to work offline.

http://iscrybe.com/

links for 2006-12-22

Non-functioning Alt key in qemu-0.8.2 displayed to X11.app

The Alt key on my US English keyboard going to OS X X11.app going to qemu-0.8.2 (using my own qemu-0.8.2 RHEL 4 package) on my RHEL 4 Linux box is not happening. Instead, this is spewed to the console.

Warning: no scancode found for keysym 310

Strange, since xev sees the keypress just fine:

KeyPress event, serial 24, synthetic NO, window 0x1000001,
    root 0x57, subw 0x0, time 411185488, (11,-16), root:(31,48),
    state 0x0, keycode 66 (keysym 0xffe7, Meta_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

I don’t know why the keysym reported by qemu doesn’t match the keysym reported by xev. I’m guessing that it has something to do with the fact that qemu uses SDL, which probably has its own keymap routines, that are apart from the X11 routines.

Technorati tags: linux, qemu, virtualization, rhel