There are some very useful scripting resources at www.robvanderwoude.com.
Any site that covers batch files, Rexx, Perl, and regular expressions is worth a look, in my opinion.
There are some very useful scripting resources at www.robvanderwoude.com.
Any site that covers batch files, Rexx, Perl, and regular expressions is worth a look, in my opinion.
One thing that I constantly need and can never remember the syntax for is redirecting stdout and stderr in a Windows batch file or cmd script (actually, the syntax is pretty much the same for *nix shell scripts).
Rather than just a one-sentence note here to remind me, I’ll write a few more sentences as explanation. Hopefully this will save someone a little bit of time
For starters, you can redirect the output of a command to a file like so:
blah.exe > output.txt
That example will overwrite any pre-existing output.txt file. If you want to append to the file, use:
blah.exe >> output.txt
But this only redirects “standard output” (stdout). If your program encounters an error, the output generated by the error condition probably won’t show up in the file. If you want it to show up in the file, redirect “standard error” (stderr) also like so:
blah.exe 2>&1 output.txt
At the moment, I can’t tell you if that will append or overwrite. I’ll check that out and update the post…
You want to sign up for that free whitepaper on the Internet, but you don’t want your email address to end up on a dozen more mailing lists — what do you do?
Use a temporary email address. Mark Gibbs has a great article about them at NetworkWorld.com.
Of course, there are drawbacks. If everyone starts using these, the companies giving out free stuff will have to find another revenue model. Mark says he’s going to talk about the consequences in a future issue of his newsletter.
Here’s an article listing 30 great free and open programs for Windows. The rest of the web site looks interesting too…
Chris Pirillo debates himself over which video network is the best.
Press play on each video in quick succession, and watch them go at it. See the original post here
The last 2 minutes, 40 seconds of this football game were amazing–just make sure to watch the whole thing!
[youtube]ZHkABO0VwCg[/youtube]
(youtube clip: Plano East-John Tyler 1994 Football)
Security Engineering: A Guide to Building Dependable Distributed Systems is available as a free chapter-by-chapter pdf download.? I haven’t read it yet, but the forward is by Bruce Schneier.? If he recommends it, it’s got to be good.
Dave Child has some very useful cheat sheets on his site www.ilovejackdaniels.com.? They include cheat sheets for regular expressions, MySQL, CSS, PHP, and more.? Thanks, Dave!
I’ve been wanting to try the Cacti network graphing system for a while, but wasn’t sure how much effort it would take. Well, it wasn’t too bad, and here are the steps that I used. Hopefully this will save someone else a few minutes.I started with the CentOS 4.3 Server CD. I really like having a single CD that will install what’s necessary for a server. I use the .iso and VMWare Server, and can have a server installed from scratch in very little time. For this server, I chose to customize the list of packages. I unchecked Mail Server, Windows File Server, DNS Name Server, FTP Server, and Printing Support. I added System Tools. I’ll assume that you have your OS installed at this point.
Configure yum. Since I want to use yum as much as possible, and cacti is not in the default CentOS repositories, I added Dag to my list of repositories. This is as simple as creating the file /etc/yum.repos.d/Dag.repo and putting the following in it:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protect=0
That last option (“protect=0”) only does anything if you’ve installed the ProtectBase plugin for yum. This plugin keeps yum from updating system or base packages from non-CentOS repositories (or however you want to configure it). You can read about it here.