Monday, March 16, 2009

There is no way out (bash)

while true; do vim Temp.java; javac Temp.java; java Temp; echo "anykey"; read; done;

UPD: file debugme.sh
#!/bin/bash

class=$1
if [[ "$class" == "" ]]; then echo "usage: debugme.sh ClassName"; exit; fi
if [ ! -f "$class.java" ]; then echo "file $class.java does not exist"; exit; fi

while true; do
vim $class.java;
javac $class.java && echo "compiled. running..." && java $class;
echo "anykey, there is no way out"; read -n1;
done;

0 comments:

Post a Comment