I’ve always loved books. They, more than any other media, have helped to shape my view of the world. Because of that, I would like to give some other folks the opportunity to read some of my favorites. To that end, I am going on an Amazon wish list buying spree. I haven’t decided yet what my spending limit will be, but the basic plan is that you will go and create an Amazon wish list, and add one (or more) of these books to it, and then put the link in a comment here, and I will buy it. You can also feel free to suggest other books that should be in this list, though I’m not promising I’ll add them. The buying spree will go until I’ve spent as much of my tax refund as I’m willing to part with, at which point I will announce that it has ended. Questions/concerns/etc. can be voiced in the comments.
If you’ve been batch scripting on Windows for a while, you probably know the way to echo a blank line: a period with no space in front of it.
echo.
And the way to chain commands together:
A || B runs B if A failed
A && B runs B if A succeeded
A & B runs B regardless
It may not be obvious, but you can echo multiple lines into a pipe without resorting to a temp file.
(echo def& echo abc) | sort
You will have to butt the ampersand against the end of each echo, or you’ll be sending spaces at the end of each line.
If you make a lot of lines, mashing them together gets hard to read. The solution to that obscure situation is below.
Edit (2010-04-25): Argh! Ampersand butting works for redirecting to a file, and FOR loops (as you’ll see in a later post), but plain ol’ pipes still get trailing spaces! Example: Pipe into sort, get spaces. Dump to tmp.txt, no spaces.
My “Right Way”, below the fold, somehow only got a space on the final line.
Netcat is reaaallly handy for piping stuff over networks. But it’s also been largely unchanged for years. There were a few forks and rewrites but they tended to be linux-only. One of the tricks it could do was ip/port scan. Scanning happened to be the primary function of the Nmap project, and so it grew to incorporate netcat features, and much more. Behold Ncat!
Edit (2010-08-03): 5.35DC1 made “-l -e” exit on disconnect, and “-l -e -k” keep awaiting new connections. Edit (2010-03-16): I announced app this too early. 5.30b1 corrected the piping bugs I mentioned before. However, combining -l and -e still makes a server that never dies on its own (acts like -k), and must be killed manually. That might be fixed in a later release.
So you’ve got some commandline tools but they each depend on a bunch of dlls? You could dump the whole mess together in one dir, but that’d be awful. Adding a dozen tool-specific dirs to your PATH isn’t pretty either. The answer: symlinks!
What’s that? Windows doesn’t have symlinks? How about shortcuts? No luck there. Well there are still batch files…
Carl Sagan’s book, The Demon-Haunted World, is an introduction to skepticism, critical thinking, and pseudoscience. The above video is based on one of its chapters.
(Wikipedia link) (Amazon link)
For some reason, probably ignorance or lucky sampling, I get more fanboy rush from small-scale chemistry than astronomy. Any other excuse that I came up with just now got trumped with, “Nebulae do it way bigger with unparalled whiz-bang.”
No wait, “On small scales, the physics can be tinkered with.” *teehee*
I’ll start and end this linkdump with Theodore Gray, the persona MacGyver could’ve been if the producers didn’t mind lawsuits.
(see final link)
Today’s the day to openly criticize religion (more so than usual). I like the idea, but until it catches on, it’s a bit like “provoke your abusive spouse day”. This year, I guess the appropriate context is to do stuff in amiable locales to build popularity. Sooo, +1 blog hotlinking satirical pics!
Edit: A blogger’s doin’ a snarky Let’s Play-esque summary as he reads through the bible.