How to Tell a Program from an Automobile (1977) [pdf]
research.microsoft.com15 pointsby soveran0 comments
$ cat riddle
Vixen Rudolph
Vixen Prancer
Vixen Dasher
Dancer Vixen
Comet Vixen
...
Vixen Dasher
Then use tsort: $ tsort riddle
Dancer
Donder
Comet
Vixen
Blitzen
Dasher
Rudolph
Cupid
Prancer if [ condition ]; then
...
else
...
fi
And now in rc: if (condition) {
...
} else {
...
}
Or a case statement in bash: case $1 in
"bar")
... ;;
"baz")
... ;;
esac
And expressed in rc: switch ($1) {
case "bar"
...
case "baz"
...
}
In the past, I've used it as my shell too, but now I use it only for scripting. I think you can install it in most platforms.