Letters

Readers sound off.

Letters

Satisfaction

After having used the internal-built G technologies with my Acer Aspire 3690, I must say with great satisfaction that the Dynex Draft N card is a solid performer. Having used Ubuntu for two years, I'm glad to see that wireless speeds are surpassing those of Windows. Where I live, everyone is wired into Windows, and as an Ubuntu fan for two years, it's amazing to have my laptop running faster than most Windows machines—as well as without the crashes all too common with Vista, my 250GB hard drive automatically working, my 2GB of RAM not conflicting with the system, and my Draft N card pulling its weight. Ubuntu, by far, is one of my favorite operating systems. I'm praying that sooner or later, all laptops and PCs are given the options to have either Windows or Linux as their primary OS.


Joseph Ziehm

It's Happening

I'm behind in my reading and just finished “Linux for the Long Haul” by Michael Surran [LJ, August 2008], about the Houlton Christian Academy's migration from Windows. Like most businesses using Linux, “GHCA has a single Windows machine in our office for the sole purpose of running Intuit's QuickBooks”. Intuit has finally begun to realize that its future is not on the Windows desktop. A version QuickBooks Online that is compatible with Firefox (and other non-IE browsers) is in the works. Now, if we can just get Photoshop....


Joe Holt

Liked That Tech Tip

I really liked the Tech Tip on page 56 of the December 2008 issue. Being a bit of a bug for efficiency, I will mention one possible improvement. However, it may work only with the Bash shell. I am not very familiar with the other shells. I do this sort of thing because Ben Franklin once said: “A cycle saved is a cycle earned!” Or something like that. I've worked on some really slow machines in my day.

The line:

F=$(echo $F| perl -pe 's/.gz$//') 

could be replaced with the line:

F=${1%.gz}

which allows the line:

F=$1

to be eliminated entirely.

And, just because I like to be different, I think that the line:

nice gunzip -c $F

would “look better” if gunzip were replaced with zcat. I think that zcat is simply more “intuitive” than gunzip -c:

nice zcat "$F"

Also notice that I enclosed $F in double quotes just in case there might be one or more blanks in the filename, which would make the unquoted $F look like multiple arguments to the zcat.

Oh, and just as a question, would sed be more efficient than perl here:

F=$(echo "$F"|sed 's/.gz$//')

Just curious on this last one.

Again, many thanks for the tip.


John McKown

Really, Really Liked That Tip

I really did like that tip [see letter above]. Using the idea in it, I created the following two functions that I now sourced by my Bash profile:

function do_cat()
{
 local CAT
 case "$1" in
 *.gz) CAT=zcat;;
 *.bz2) CAT=bzcat;;
 *) CAT=cat;;
 esac
 $(${CAT} "$1")
)

function smart_cat()
{
 local i
 for i in "$@"; do
 do_cat "$i"
 done
}

Very thought-provoking tip! Of course, the do_cat function can be extended to handle other cat-like commands simply by including more entries in the case portion of the do_cat() function. I guess I could have created only a single function of smart_cat(), but I like the separation of using two functions.


John McKown

Correction

In the December 2008 issue of Linux Journal, the “Going MoBile” interview said that Linux Journal's mobile site, m.linuxjournal.com, ran on Linux-based MoFuse. Instead, it runs on Drupal (as does our main site), using a theme optimized for mobile devices.


Doc Searls

Photo of the Month

Have a photo you'd like to share with LJ readers? Send your submission to publisher@linuxjournal.com. If we run yours in the magazine, we'll send you a free T-shirt.

Logan Bryngelson, submitted by his father, Ryan Bryngelson.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

thanks a lot for the tip

killthesquirrel's picture

thanks a lot for the tip with do_cat() , just what I needed in my code

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState