Need GTK+ support for the command or shell. Yes this is the right command. It's almost belong to similar family like Xdisplay, display, cDisplay.
Try this, it's awesome. I do no whether it's inbuilt in redhat but it's there in ubuntu.
Some quick cracks on that.
To get the calendar !
zenity --calendar
To get the input from the user !
zenity --entry
To get Yes or No
zenity --question --text "Do you need to proceed reading?"
Use the ouput of the above command to input of another command using echo $?.
The echo$? returns status of the previous command.
answer=`zenity --question --text "You appear to have an AMD64 architecture. Do you want to install the 64-bit version of Songbird?"; echo $?`
if [ $anw = 0 ] ; then
....
....
....
fi
I've missed this command lot or else I would've used in most of my scripting languages to get the user inputs :)
About Me
Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts
Tuesday, 11 March 2008
Thursday, 21 February 2008
Needed shell script to compile and run java files.
#Let's start building the classpath with existing jars & libs.
THE_CLASSPATH=
for i in `ls *.jar`
do
THE_CLASSPATH=${THE_CLASSPATH}:${i}
done
# Let's compile all the java file.
for i in `find . -name '*.java'`
do
echo "Compiling $i"
javac -cp $THE_CLASSPATH $i
done
# invoke the main function.
java -cp .:$THE_CLASSPATH $CLASSNAME$
unset THE_CLASSPATH
THE_CLASSPATH=
for i in `ls *.jar`
do
THE_CLASSPATH=${THE_CLASSPATH}:${i}
done
# Let's compile all the java file.
for i in `find . -name '*.java'`
do
echo "Compiling $i"
javac -cp $THE_CLASSPATH $i
done
# invoke the main function.
java -cp .:$THE_CLASSPATH $CLASSNAME$
unset THE_CLASSPATH
Subscribe to:
Posts (Atom)
