Upper, Lower Case and Trim

Posted March 3rd, 2009. Filed under Sharing elmu

Here is simple example how to set upper and lower case in shell script :

var="sAmplE teST"
var_ucase=`echo ${var} | tr [a-z] [A-Z]`
var_lcase=`echo ${var} | tr [A-Z] [a-z]`
echo "Upper Case : ${var_ucase}"
echo "Lower Case : ${var_lcase}"

Here is example how to trim variable in shell script :

var=" 322245 "
var_trim=`echo ${var} | sed 's/^ *\(.*\) *$/\1/'`
echo "Trimmed var : ${var_trim}"

Back to Coding

Posted March 3rd, 2009. Filed under My Job

My last full development project is a year ago, creating messaging VAS application. Now will start to coding again. Actually in my current project still not far from scripting world but I only use unix shell script since it very easy to maintain as for now. And some of my freelance projects use php instead of java, so this will be very interesting for me to deal with.

First thing to to is creating my development environment:

- Install subversion and add subclipse plugin to my ganymede. Mac OS Leopard is comes with installed subversion so I don’t need to install it again, just need to install subversion GUI which I prefer to use is SvnX :)

- Install Confluence and JIRA, this is for personal use only (maybe the whole team would use it also)

- Install Oracle, *sigh* use vmware for this cause still find out how to install oracle on Mac OS X

Second thing is refresh my development stack, here is the list :

- Spring Framework, an awesome MVC framework that simply use and robust

- Acegi security which embedded with Spring Framework

- Hibernate

- Spring JDBC

- jUnit, DBUnit and Cobertura for testing

- Ant, I’m old fashioned person who likes it better than maven

- jQuery, somehow I found out this is very interesting to learn

Lets start the engine…. ^_^