# Compile and execute
while true
do
gcc -o $1.out $1.c
case "$?" in
0)echo "Executing ..."
./$1.out
exit;;
*)
sleep 5
vi $1.c
esac
done
Output
[vijai@localhost command]$ sh debug.sh samp
samp.c:4:10: warning: multi-line string literals are
deprecated
samp.c:4:10: missing terminating " character
samp.c:4:10: possible start of unterminated string literal
samp.c: In function `main':
samp.c:4: parse error at end of input
Executing ...
Hello
while true
do
gcc -o $1.out $1.c
case "$?" in
0)echo "Executing ..."
./$1.out
exit;;
*)
sleep 5
vi $1.c
esac
done
Output
[vijai@localhost command]$ sh debug.sh samp
samp.c:4:10: warning: multi-line string literals are
deprecated
samp.c:4:10: missing terminating " character
samp.c:4:10: possible start of unterminated string literal
samp.c: In function `main':
samp.c:4: parse error at end of input
Executing ...
Hello
No comments:
Post a Comment