When you are using a text box to enter commands in a computer, be it Linux or a DOS box on Windows, the command may send some output to the screen. If it is generating a lot of output that you want to be able to study at your leisure, it would be nice to collect all this information in a file.
The standard trick for doing this is to redirect the output to a file using the greater than sign, like this:
dir > dir.lst
The dir command will list all the files in your current directory. This command, with the redirect symbol, it will put a list of all those files in a file called "dir.lst".
While I was fooling with Linux yesterday, this trick did not work. I was a little shocked and a little disappointed, but I was able to get by and get my work done anyway. Afterwords, I was doing a little poking around, examining the debris left from my mad thrashing, and I discovered something slightly unsettling. A great number of commands are defined like environment variables. Take a look at what set produces. Less than half of what comes back is standard environment variable definitions. The rest of it is page upon page of procedures written in some arcane script language. No wonder redirection doesn't work.
Silicon Forest
If the type is too small, Ctrl+ is your friend
Wednesday, September 10, 2008
Barbeque
I am not big on cooking, but I will grill a steak or some hamburgers if the weather is decent. I use a charcoal grill ostensibly because it makes the meat taste better than if you use one of those gas grills. On the other hand it could be because I am too cheap to buy one of those fancy schmancy gas grills.
I have an old Weber that I bought at a garage sale for $5. It replaced one my wife got from one of her roommates when we lived in Texas. It eventually deteriorated to the point where it needed repair or replacement, and $5 for a grill in good condition was too good a deal to pass up.
The Weber isn't perfect. The grill is at a fixed height over the charcoal, so no matter what you are cooking you need a heap of charcoal to make a big enough fire to reach the food. If the grill height was adjustable you could save on charcoal for smaller cookouts. It's getting old, and it does not seal that well so whatever charcoal is in there pretty much burns up every time.
The big problem with this grill (and every other charcoal grill I know of) is that cleaning out the ashes is a big pain. Why can't someone make a grill that will just drop the ashes into a bucket? I guess real practicality doesn't sell. It's the sizzle that sells the grill. Someday I will design one and have it made.
Update December 2016 removed missing picture.
![]() |
| Weber Charcoal Grill |
The Weber isn't perfect. The grill is at a fixed height over the charcoal, so no matter what you are cooking you need a heap of charcoal to make a big enough fire to reach the food. If the grill height was adjustable you could save on charcoal for smaller cookouts. It's getting old, and it does not seal that well so whatever charcoal is in there pretty much burns up every time.
The big problem with this grill (and every other charcoal grill I know of) is that cleaning out the ashes is a big pain. Why can't someone make a grill that will just drop the ashes into a bucket? I guess real practicality doesn't sell. It's the sizzle that sells the grill. Someday I will design one and have it made.
Update December 2016 removed missing picture.
Portable Graphics
The first few days of working with Linux are always the roughest. There are innumerable little twists and tricks that you need to just accomplish the simplest things. But once you gotten through this initial trial, things become much easier.
I am feeling generous right now because I just finished successfully porting my gear program from Windows to Linux and then back. The number of changes I had to make on the return to Windows are few enough (2) that I am confident that this version will compile and run unchanged on the Linux system.
Geez, what a struggle it was to get here though. First there was just getting the screen resolution up to something usable. Okay, I've gotten a little spoiled. I remember when 640 by 480 was perfectly adequate, now I'm running 1280 by 1024 on my Windows machine. It makes the 1024 by 768 on the Linux box look a little feeble, but I've managed to adjust.
So I mail the source files to myself and download the zip file from my gmail account using Firefox on Linux. That part actually works. Start work on a makefile, try compiling. The graphics include files are not here! Search the disk and still no luck. So now we venture into the swamp of Linux forums on the internet, trying to figure out what is going on. Eventually I run into something called Mesa, which seems like it might be what I am looking for. They have a pretty good explanation of what is required, so I download their three files and unzip them.
Type "make" in the terminal window and I get infinity errors. There are so many I cannot find the beginning even if I scroll back to the top of the very large terminal buffer. WTF? Back to the swamp. Finally stumble across some instructions for building "Micropolis", whatever that is, but they seem to be having similar problems. Seems if you want to build Mesa, there are about half a dozen other software packages you need to install. You don't need just one, or two, or three, you need all eight of them. I am not sure about number seven. I installed it out of order and it didn't help, but when I finally installed the last one, Mesa built without complaint.
OK, great. Now I should be good to go. Well, actually, my program compiles, which is really a good thing, but it won't link. Can't find the libraries. Can't even find the math libraries, the ones that contain things like sin and cos, you know, basic trig functions. Now that's pretty chickens**t. More slogging through the swamp and I find some very good instructions for gcc (the Linux compiler and linker and general all around beast of burden for programmers) which tells me how to specify libraries.
It also helps that I am able to puzzle out enough makefile/shell syntax to write a fairly concise makefile, something I used to be able to do in my sleep. All this gets rid of the unresolved references to the math functions, but I am not making any progress on the graphics functions. The error listing is now small enough that it does not overflow the terminal buffer, so I can go back to the beginning and study it at leisure. I always want to start with the first error because often times that is one that triggers the avalanche. So if you can fix the first one, all the other errors might disappear.
That is not the case this time. All I see if hundreds of unresolved references to graphics functions. I try changing libraries. Maybe I am not using the right one. I try changing library paths. I write test scripts to verify that what I am doing with these environment variables is what I intended. No help. I'm looking at the error listing again and I see this one line that is different from the rest, not very different, just a little different. Looking closer, I see it popping up in a couple of other places. It is totally cryptic, it means absolutely nothing to me, but shoot, let's see what Google can do with it.
Surprise, surprise, it leads me right back to the web site about the gcc compiler. Seems if you feed C++ files to gcc, it will compile them, but the object files it creates will be unlinkable. In other words, they are trash. If you want to compile C++ code, you should use g++ instead of gcc. Criminently, what a bunch of gooberness. There is hardly any C++ code in my program, so I chop it out and recompile and the funny errors go away. However, I am still stuck with the unresolved references to the graphics functions. It's late, I'm tired, I give up and go to bed.
This morning I get up and it's got me bugged, so I go back and try some variations on the graphics libraries, and presto! Compile and link success! I am still left with the question as to what the other libraries are for, especially the ones with the same names in different directories.
But hey, it compiled! Will it run? Sure it will! Give it a try, boom, error, fail, die. What's wrong now? More wallowing in the swamp, no luck here. Let's try the debugger. No luck. Maybe we need to compile a debug version. More consulting the gcc manual, change the compiler control, recompile, debug, step through the program, it can't open the configuration file! Bam! Hand to forehead, of course it can't, I was so concerned about getting to the run stage, that I neglected to copy the input data file.
This is one of these cases where a development crutch let me skip good programming practice. Under Visual C, if it can't find the file, the Visual C debugger will tell you. On Linux, it just hands you a big fat zero, and if you mistake that zero for a file handle and try to use it, boom, down you go in a heap. So we add another test to ensure that the system hasn't handed us a big fat zero instead of a file handle. Stupid system.
Put a copy of the input file where our program should be able to find it, compile and run, and zowie! There it is on the screen, bigger than Dallas! Little bitty gears going round and round and round. This is very cool.
Okay, but we've made a bunch of changes, minor, but changes nonetheless, so we need to go back to the Windows system and see if it will recompile and run over there. It doesn't right off, but all I have to do is add a conditional include of windows.h and everything is copacetic. The condition should fail on Linux, so it shouldn't look for windows.h and everything should be copacetic over there too. It better be.
P.S. Don't use angle brackets in your blog text. It makes things disappear.
I am feeling generous right now because I just finished successfully porting my gear program from Windows to Linux and then back. The number of changes I had to make on the return to Windows are few enough (2) that I am confident that this version will compile and run unchanged on the Linux system.
Geez, what a struggle it was to get here though. First there was just getting the screen resolution up to something usable. Okay, I've gotten a little spoiled. I remember when 640 by 480 was perfectly adequate, now I'm running 1280 by 1024 on my Windows machine. It makes the 1024 by 768 on the Linux box look a little feeble, but I've managed to adjust.
So I mail the source files to myself and download the zip file from my gmail account using Firefox on Linux. That part actually works. Start work on a makefile, try compiling. The graphics include files are not here! Search the disk and still no luck. So now we venture into the swamp of Linux forums on the internet, trying to figure out what is going on. Eventually I run into something called Mesa, which seems like it might be what I am looking for. They have a pretty good explanation of what is required, so I download their three files and unzip them.
Type "make" in the terminal window and I get infinity errors. There are so many I cannot find the beginning even if I scroll back to the top of the very large terminal buffer. WTF? Back to the swamp. Finally stumble across some instructions for building "Micropolis", whatever that is, but they seem to be having similar problems. Seems if you want to build Mesa, there are about half a dozen other software packages you need to install. You don't need just one, or two, or three, you need all eight of them. I am not sure about number seven. I installed it out of order and it didn't help, but when I finally installed the last one, Mesa built without complaint.
OK, great. Now I should be good to go. Well, actually, my program compiles, which is really a good thing, but it won't link. Can't find the libraries. Can't even find the math libraries, the ones that contain things like sin and cos, you know, basic trig functions. Now that's pretty chickens**t. More slogging through the swamp and I find some very good instructions for gcc (the Linux compiler and linker and general all around beast of burden for programmers) which tells me how to specify libraries.
It also helps that I am able to puzzle out enough makefile/shell syntax to write a fairly concise makefile, something I used to be able to do in my sleep. All this gets rid of the unresolved references to the math functions, but I am not making any progress on the graphics functions. The error listing is now small enough that it does not overflow the terminal buffer, so I can go back to the beginning and study it at leisure. I always want to start with the first error because often times that is one that triggers the avalanche. So if you can fix the first one, all the other errors might disappear.
That is not the case this time. All I see if hundreds of unresolved references to graphics functions. I try changing libraries. Maybe I am not using the right one. I try changing library paths. I write test scripts to verify that what I am doing with these environment variables is what I intended. No help. I'm looking at the error listing again and I see this one line that is different from the rest, not very different, just a little different. Looking closer, I see it popping up in a couple of other places. It is totally cryptic, it means absolutely nothing to me, but shoot, let's see what Google can do with it.
Surprise, surprise, it leads me right back to the web site about the gcc compiler. Seems if you feed C++ files to gcc, it will compile them, but the object files it creates will be unlinkable. In other words, they are trash. If you want to compile C++ code, you should use g++ instead of gcc. Criminently, what a bunch of gooberness. There is hardly any C++ code in my program, so I chop it out and recompile and the funny errors go away. However, I am still stuck with the unresolved references to the graphics functions. It's late, I'm tired, I give up and go to bed.
This morning I get up and it's got me bugged, so I go back and try some variations on the graphics libraries, and presto! Compile and link success! I am still left with the question as to what the other libraries are for, especially the ones with the same names in different directories.
But hey, it compiled! Will it run? Sure it will! Give it a try, boom, error, fail, die. What's wrong now? More wallowing in the swamp, no luck here. Let's try the debugger. No luck. Maybe we need to compile a debug version. More consulting the gcc manual, change the compiler control, recompile, debug, step through the program, it can't open the configuration file! Bam! Hand to forehead, of course it can't, I was so concerned about getting to the run stage, that I neglected to copy the input data file.
This is one of these cases where a development crutch let me skip good programming practice. Under Visual C, if it can't find the file, the Visual C debugger will tell you. On Linux, it just hands you a big fat zero, and if you mistake that zero for a file handle and try to use it, boom, down you go in a heap. So we add another test to ensure that the system hasn't handed us a big fat zero instead of a file handle. Stupid system.
Put a copy of the input file where our program should be able to find it, compile and run, and zowie! There it is on the screen, bigger than Dallas! Little bitty gears going round and round and round. This is very cool.
Okay, but we've made a bunch of changes, minor, but changes nonetheless, so we need to go back to the Windows system and see if it will recompile and run over there. It doesn't right off, but all I have to do is add a conditional include of windows.h and everything is copacetic. The condition should fail on Linux, so it shouldn't look for windows.h and everything should be copacetic over there too. It better be.
P.S. Don't use angle brackets in your blog text. It makes things disappear.
Monday, September 8, 2008
Home Theater, Part 5
Originally wrote this about three weeks ago thinking I was going to add some more to the story, but that hasn't happened. Lot's more to the story, but I got distracted, so you aren't going to hear about it, at least for a while.
I finally got fed up with Media Center DVR / STB combo (Digital Video Recorder / Set Top Box), called Verizon and ordered two regular DVR's. Not sure why I didn't do this in the first place. It will cost a couple bucks more month (like $34 instead of $30), but the aggravation it will save will be priceless. The idea was that you could have one DVR recording shows and you could play the recorded shows either there or from any other TV with an STB. Seems to me it was also cheaper.
The theory is nice, but in practice there were two many glitches. You could not set up recordings from the STB. You could not delete recordings. All recording management had to be done with the DVR. Fast forward and rewind had poor response times. The jump ahead and jump back buttons did not work and could not be changed. But mostly the STB box was flakey. It would lock up, lose it's place, just generally behave badly. Not often, but once is too much.
Another aspect is that you cannot play HD (High Definition) recordings on a regular TV. With so many channels available in HD now, sharing a DVR between an HD TV and a standard one didn't really make much sense.
The new DVR's seem to be a little more with it. I just programmed one to record a series and it had a bunch of episodes listed (all of them? I don't know, I didn't scroll through the whole list. It was long.)
I did run into one glitch. Hooked it up and waited. I read somewhere in the instructions that you have to wait a while for it to sort itself out the first time you turn it on. Come back later, think it should be ready to go, and ... nothing. Is this thing DOA (Dead On Arrival) ? It wouldn't be the first time I've had problems like this.
Fortunately I have another one I can try. I start unpacking it, and I think maybe I ought to look at the instructions once more. Oh! What's this? You have to CALL VERIZON to activate the box. What a friggin' pain. I hate this stuff. I can see it now: make the call, listen to some stupid recording, push a bunch of buttons, listen to a bunch more stupid recordings, end up on the wrong menu, get disconnected, put on hold, connected to the department of terminal stupidity. This puts in me such a funk that I abandon the task, go get a cup of tea and read for a while.
Fortified with tea, I go back to the instructions, resolved to make the stupid phone call and I see that there is a web address. I draft my son who is in between attacks on the enemy base to pull up the web site and enter the requisite numbers. OK, all done, now all we have to do it wait, again. 5 to 40 minutes. Mom's home, go eat dinner and we shall see.
All's well on DVR#1, now for DVR#2.
I finally got fed up with Media Center DVR / STB combo (Digital Video Recorder / Set Top Box), called Verizon and ordered two regular DVR's. Not sure why I didn't do this in the first place. It will cost a couple bucks more month (like $34 instead of $30), but the aggravation it will save will be priceless. The idea was that you could have one DVR recording shows and you could play the recorded shows either there or from any other TV with an STB. Seems to me it was also cheaper.
The theory is nice, but in practice there were two many glitches. You could not set up recordings from the STB. You could not delete recordings. All recording management had to be done with the DVR. Fast forward and rewind had poor response times. The jump ahead and jump back buttons did not work and could not be changed. But mostly the STB box was flakey. It would lock up, lose it's place, just generally behave badly. Not often, but once is too much.
Another aspect is that you cannot play HD (High Definition) recordings on a regular TV. With so many channels available in HD now, sharing a DVR between an HD TV and a standard one didn't really make much sense.
The new DVR's seem to be a little more with it. I just programmed one to record a series and it had a bunch of episodes listed (all of them? I don't know, I didn't scroll through the whole list. It was long.)
I did run into one glitch. Hooked it up and waited. I read somewhere in the instructions that you have to wait a while for it to sort itself out the first time you turn it on. Come back later, think it should be ready to go, and ... nothing. Is this thing DOA (Dead On Arrival) ? It wouldn't be the first time I've had problems like this.
Fortunately I have another one I can try. I start unpacking it, and I think maybe I ought to look at the instructions once more. Oh! What's this? You have to CALL VERIZON to activate the box. What a friggin' pain. I hate this stuff. I can see it now: make the call, listen to some stupid recording, push a bunch of buttons, listen to a bunch more stupid recordings, end up on the wrong menu, get disconnected, put on hold, connected to the department of terminal stupidity. This puts in me such a funk that I abandon the task, go get a cup of tea and read for a while.
Fortified with tea, I go back to the instructions, resolved to make the stupid phone call and I see that there is a web address. I draft my son who is in between attacks on the enemy base to pull up the web site and enter the requisite numbers. OK, all done, now all we have to do it wait, again. 5 to 40 minutes. Mom's home, go eat dinner and we shall see.
All's well on DVR#1, now for DVR#2.
Money Press
This is one of those really dumb ideas that will probably make someone a bunch of money someday: a press for ironing your money. I think I got the idea from watching ads for the TV show Monk, combined with my habit of going through the bills in my wallet to see how much money I have.
Go to three or four stores and spend a few bucks at each one and, presto, my previously well organized stack of cash is reduced to a crumpled wad of bills. So every so often, I will sit down and pull all the bills out, straighten out the edges, flatten them out, arrange them in order and count. Sometimes I am more fastidious than others, but badly crumpled bills interfere with orderly counting, and I do like order, so I take the time to smooth them out.

And then there is the story I read somewhere about how ironing dollar bills will restore some of their original flatness. Well, I am not going to get out the iron and ironing board and plug it in and wait for it to heat up just to flatten out some bills that will be gone within a week. But! If I had a little desktop ghee-gaw that ironed the bills for me, I might just use it. Geez, the kind of stuff that goes through my brain.
Update December 2016 replaced missing picture.
Idle Fancy Meets Rocky Road

I got a comment (!) on my Granny Gear for Bicycles post from Andrew Hall in Kenya. He has his own blog about his work in a slum there. This post in particular is Illuminating, to say the least.
Sunday, September 7, 2008
Labor Day Weekend
was a little busy.Daughter came home from UW on the train. Saturday my wife and I drove to Eugene to help Ross move into a new apartment. Sunday all the kids are at home so we cooked some steaks. Would have grilled them, but we were out of charcoal. (!?!?!) Monday daughter left for Seattle, Tuesday Ross left on an automobile tour of the lower 48 states, and John started back to High School on Wednesday.
Eugene Apartment
Ross moved out of a shared duplex into his own compartment. The place is a bit nicer than the old one, but it is still in an old building. The wood in the door frame around the latch is mostly gone. The screws in the striker plate are only held in place by wishful thinking. There is a bolt on the door, so it is semi-secure.
Moving
Ross has already moved most of his small stuff, so we only need to make two trips with the pickup truck. One to move his bed, and the other to move the remains, including a small desk. We move the desk onto the tailgate prior to unloading it. I lean on it while stepping over and around to the rear bumper. The leg under the corner I am leaning on is exactly over the gap between the bed of the truck and the tailgate, and when I put my weight on it, it drops down throwing me off balance and something whaps me in the leg. Didn't feel like much at the time, and I never did figure out what is was that bit me, but a week later and I still have a big knot and yellowish bruise just above my left ankle. Grrr.
Hirons
The apartment is unfinished and being as we have certain standards to maintain (harrumph), it needs curtains. In order to buy curtains, it might be a good idea to take a few measurements. Off to the local strip mall to get a tape measure. We find one in Hirons Pharmacy. Actually I asked a clerk and she pointed me in the right direction. I don't think I would have found it otherwise. I have never seen a store packed so full of so much stuff, and not useful stuff either. Cheap, gimcrack decorations of every kind. I could not believe it. It was like waking into a fairy tale, or a nightmare. But they did have a small section of tools and we got our tape measure.
Target
So off we go to Tarchez. We don't have a map, but we have a vague idea where it is so off we go. And go, and go. I think we ended up circumnavigating Eugene before we finally find a Tarjai on the West side. Two hours later we emerge with a couple hundred dollars worth of stuff. We filled two shopping carts and we didn't even make a dent in the stores stock. How much inventory do you think they must have in there? It has got to be big. Ten million dollars, maybe? More? You can fill a single shipping container with a million dollars worth of goods easily. Could a single Target have a hundred million dollars worth of inventory? That would be impressive.
Home
The curtains are full length, they go all the way to floor, more like drapes. When we get back to the apartment we discover that there are baseboard heaters under the windows. Not a good idea to have drapes covering those up, so it looks like they are going to have to be trimmed. It's getting late and there is a football game today, so if we want to beat the mass exodus, we should go, and we do.
Eugene Apartment
Ross moved out of a shared duplex into his own compartment. The place is a bit nicer than the old one, but it is still in an old building. The wood in the door frame around the latch is mostly gone. The screws in the striker plate are only held in place by wishful thinking. There is a bolt on the door, so it is semi-secure.
Moving
Ross has already moved most of his small stuff, so we only need to make two trips with the pickup truck. One to move his bed, and the other to move the remains, including a small desk. We move the desk onto the tailgate prior to unloading it. I lean on it while stepping over and around to the rear bumper. The leg under the corner I am leaning on is exactly over the gap between the bed of the truck and the tailgate, and when I put my weight on it, it drops down throwing me off balance and something whaps me in the leg. Didn't feel like much at the time, and I never did figure out what is was that bit me, but a week later and I still have a big knot and yellowish bruise just above my left ankle. Grrr.
Hirons
The apartment is unfinished and being as we have certain standards to maintain (harrumph), it needs curtains. In order to buy curtains, it might be a good idea to take a few measurements. Off to the local strip mall to get a tape measure. We find one in Hirons Pharmacy. Actually I asked a clerk and she pointed me in the right direction. I don't think I would have found it otherwise. I have never seen a store packed so full of so much stuff, and not useful stuff either. Cheap, gimcrack decorations of every kind. I could not believe it. It was like waking into a fairy tale, or a nightmare. But they did have a small section of tools and we got our tape measure.
Target
So off we go to Tarchez. We don't have a map, but we have a vague idea where it is so off we go. And go, and go. I think we ended up circumnavigating Eugene before we finally find a Tarjai on the West side. Two hours later we emerge with a couple hundred dollars worth of stuff. We filled two shopping carts and we didn't even make a dent in the stores stock. How much inventory do you think they must have in there? It has got to be big. Ten million dollars, maybe? More? You can fill a single shipping container with a million dollars worth of goods easily. Could a single Target have a hundred million dollars worth of inventory? That would be impressive.
Home
The curtains are full length, they go all the way to floor, more like drapes. When we get back to the apartment we discover that there are baseboard heaters under the windows. Not a good idea to have drapes covering those up, so it looks like they are going to have to be trimmed. It's getting late and there is a football game today, so if we want to beat the mass exodus, we should go, and we do.
Subscribe to:
Posts (Atom)


