home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (groovyConsole)

This example Groovy source code file (groovyConsole) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

console, date, dirname, dirname/startgroovy, do, groovy, groovy, groovy_app_name=groovyconsole, groovy_app_name=groovyconsole, okt, prg, prg, revision, un*x

The Groovy groovyConsole source code

#!/bin/sh

##############################################################################
##                                                                          ##
##  Groovy Console script for UN*X                                          ##
##                                                                          ##
##############################################################################

##
## $Revision: 18152 $
## $Date: 2009-10-29 10:39:32 +0100 (Do, 29. Okt 2009) $
##

GROOVY_APP_NAME=GroovyConsole

# resolve links - $0 may be a soft-link
PRG="$0"

while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`/"$link"
    fi
done

DIRNAME=`dirname "$PRG"`

. "$DIRNAME/startGroovy"

startGroovy groovy.ui.Console "$@"

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy groovyConsole source code file:

new blog posts

 

Copyright 1998-2013 Alvin Alexander, alvinalexander.com
All Rights Reserved.