Linux Blog

The Open Source Community – Please wait a while…

Filed under: General Linux — TheLinuxBlog.com at 11:12 am on Thursday, July 24, 2008

Netbeans, Please wait a whileYou have to admire the open source community. With such a diverse group of people all kinds of things can happen. One thing that cracked me up today was the language used in the NetBeans project (see image.)

I’m a big fan of the project don’t get me wrong, I just thought it was funny. I actually have a personal encounter with something similar when I was the developing a project. I was coding some error handling procedures on a website where all invalid input (temporarily) got directed to an obnoxious error page that read “Error!” with a bright yellow background and black text. When a end user accidentally typed a url in wrong it created the error. Since this website was for a bunch of writers they didn’t like this too much, so they picked on me until it was fixed.

This is part of the problem with the open source community. When an application is created often not enough thought is put into the interface and terminology used or the thought process of the low tech end user. It is different when a company develops an application because they can spend money on designers, interface experts and writers. In the open source community there is a lack of resources and collaboration to make this happen.

Even with well established organizations like Tigris (subversion) cryptic messages that appear in certain products can be difficult to decipher for problems as simple as permissions issues.

I don’t think it is a good idea for every one to “wait a while” to solve this problem because its not going to fix its self. So in closing I propose the question:

“what can the open source community do to solve this problem?”

Please discus.

Using wc and How To Count Table Rows

Filed under: Shell Script Sundays — TheLinuxBlog.com at 1:07 pm on Sunday, March 9, 2008

I made this little script to check how many packages were available on the web from the Cygwin Package Repository located at http://www.cygwin.com/packages

Its a one liner but it does its job well.

CYGLIST=$(curl http://www.cygwin.com/packages/ | grep \<tr | grep ball | wc -l); echo $CYGLIST;

All the above is doing is creating a variable called CYGLIST that is the result of grabbing the cygwin.com/packages/ page, grepping all of the TR’s that also have the word “ball” in it (for the image) and then using the wc -l (L) command to count how many results are found. Then the list is echoed out.

wc is a very useful command for printing newline, word and byte counts. This is a good example of how to use wc to count lines in a shell script. wc can also be used to print all of these values in one line of a file.  The syntax is below:

bash-3.1# wc file.txt
9  20 184 file.txt

The above shows the number of lines in the file.txt, it shows how many words are in the file and also how many bytes. In my first example wc uses the -l switch to display the number of lines. This script can also be used with a little bit of bash math to calculate how many items are in an HTML list. I’m working on a script that automatically does this, when its finished I will be sure to post it here on The Linux Blog.