HOWTOs
More Fun With Bash Quoting
November 19th, 2009 by Mitch Frazier in
I've written about bash quoting before, and yes, it's about as exciting as watching paint dry or listening to the corn grow. It can also be extremely frustrating when it doesn't do what you want, case in point: trying to script the updating of a field in a mysql table when the field to be changed contains quote characters.
Tech Tip: Find Directories Over a Certain Size
November 17th, 2009 by Da A Feng in
It's fairly simple to find large files on your system using commands such as find, but if you're looking for directories over a certain size find won't help you. The Perl script presented here can help you track down those explosively large directories.
Package Management With Zypper
November 5th, 2009 by Mitch Frazier in
As I've mentioned before I'm an openSUSE user, and as long as they don't make the "U" lower case again, I'll probably stick with it. When it comes to package management, OpenSUSE and SUSE Linux Enterprice (and SuSE before them) are usually associated with YaST (and yes, I'm still waiting for them to upper case the "a"). YaST works well but it's a bit verbose for installing a single package, and of course that's just more fodder for the apt-getters with all their apt-get install this and their apt-get install thats. And you can't argue with them, but there are other options with openSUSE: yum and apt4rpm come to mind, but the preferred solution is zypper.
Tech Tip: Restore Ctrl-Alt-Backspace in Ubuntu
November 3rd, 2009 by Mallik Arjun in
In the last release of Ubuntu (9.04) the Ctrl+Alt+Backspace key sequence normally used to kill the X server was disabled by default. Apparently many people like to kill their X server this way so a workaround "dontzap" package was used to enable it. With the latest Ubuntu release (9.10, aka Karmic) it's even simpler to enable it.
Tech Tip: Save an Online Video with your Browser (no extensions needed)
October 28th, 2009 by Cheng Renquan in
Sometimes when you're watching online videos on youtube or other sites, you want to save some of them for later offline playback. You've probably heard of Firefox extensions like DownloadHeloper that can do this, but sometimes you may only have a bare version of Firefox, or perhaps a different browser, one that doesn't have a plugin for doing this. Using the tip below, you can save videos no matter what browser you're using.
Tech Tip: Go Green On Your Screen(saver)
October 20th, 2009 by Sangeeth Keeriyadath in
I usually lock my screen when I leave my cubicle for a tea-break etc. With all the talk of saving energy these days I've disabled screen-savers on my system. Still, when I'd lock my screen I noticed that the LCD didn't turn off completely. Wanting to go as green as I could I wanted to switch off the LCD as well.
Android or WebOS? Try before you buy! Part 2.
October 14th, 2009 by Ross Larson in
This article assumes that you are using:
Tech Tip: Send an Email Alert When Your Disk Space Gets Low
October 13th, 2009 by Mallik Arjun in
If you don't want to step up to a full monitoring solution such as Nagios you can create your own scripts for monitoring the things that you want to monitor, such as disk space. The following script alerts you when your root partition is almost full:
Android or WebOS? Try before you buy!
October 12th, 2009 by Ross Larson in
Tech Tip: Automaticaly Organize Your Photos by Date
October 7th, 2009 by Zsolt Hajdu in
Now that summer is over and your digital camera is full of pictures, how do you get them organized? At the command line of course! The script provided here automatically organizes them into sub-directories by date.
More Bash Redirections
October 6th, 2009 by Mitch Frazier in
Everybody's seen redirection in bash commands, that's pretty common, but bash also allows you to define redirections when you define functions. This causes the redirections to be evaluated/executed whenever the function is called. This feature doesn't really give you any new features, just another way to express existing features.
Tech Tip: Meld for Visual Diffs
October 5th, 2009 by Lucas Vieites in
In diff tool speak, a visual diff tool is a GUI application. Meld is such a tool: a tool for displaying differences between files (and directories) and also for merging the differences. Meld is programmed in Python.
7 Steps to Better Tables of Contents in OpenOffice.org Writer
October 1st, 2009 by Bruce Byfield in
Like other word processes, OpenOffice.org Writer makes creating tables of contents (ToCs) quick and easy. Unfortunately, it also works with unaesthetic defaults and allows you to make choices that complicate your work flow rather than improving it.
Fortunately, Writer is also flexible enough to allow you to produce useful, aesthetic ToCs if you follow a few basic steps.
More on Using Bash's Built-in /dev/tcp File (TCP/IP)
September 30th, 2009 by Mitch Frazier in
If you saw yesterday's Tech Tip and were looking for more on using TCP/IP with bash's built-in /dev/tcp device file then read on. Here, we'll both read from, and write to a socket.
Tech Tip: TCP/IP Access Using bash
September 29th, 2009 by Federico Lucifredi in
Most of us default to wget, curl, netcat and others when in need of network data from the commandline, not knowing, or perhaps forgetting, that bash often provides the support that we need using redirection from /dev/proto/host/port.
Synthesizing Voice From the Command Line
September 23rd, 2009 by Mitch Frazier in
I don't do a lot of audio/video stuff with my system, but the other day I had the urge to see if there was some voice synthesis software available on Linux and it turned out that I already had it installed: it's called Festival. Turns out there are a number of voice synthesis and analysis packages available.
Tech Tip: Really Simple HTTP Server with Python
September 22nd, 2009 by Mohammed hisamuddin in
If you need a quick web server running and you don't want to mess with setting up apache or something similar, then Python can help. Python comes with a simple builtin HTTP server. With the help of this little HTTP server you can turn any directory in your system into your web server directory. The only thing you need to have installed is Python.
Use curl to Monitor Your Vonage Phone Bill
September 17th, 2009 by Mitch Frazier in
If you're a Vonage user and you'd like to keep tabs on your bill as the month progresses, the script described here can help. The script uses curl to login to your Vonage account and download the web page with your current balance. The balance is then extracted using grep and sed.
Tech Tip: Using Figlet to Spice Up Your Scripts
September 16th, 2009 by Kristofer Occhipinti in
Shell Scripts are very useful but not all that fun to look at. They have simple user input and output text. But, there is a way to spice up your scripts and make them a bit more eye catching with a simple program called "Figlet".
Returning Values from Bash Functions
September 11th, 2009 by Mitch Frazier in
Bash functions, unlike functions in most programming languages do not allow you to return a value to the caller. When a bash function ends its return value is its status: zero for success, non-zero for failure. To return values, you can set a global variable with the result, or use command substitution, or you can pass in the name of a variable to use as the result variable. The examples below describe these different mechanisms.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Nov-19-09
- Nov-04-09
Recently Popular
From the Magazine
December 2009, #188
If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.








