Hi,
After looking through the Bash man pages, I couldn't see any sort of goto statement like Windows Batch files have. Is there a way of doing:
Currently, I'm just doing this on each line of my script, which is kind of annoying:
Also, I noticed that the block in blue is useless for exiting when make fails unless I don't pipe to grep. How can I fix that problem and still filter the output through grep?
After looking through the Bash man pages, I couldn't see any sort of goto statement like Windows Batch files have. Is there a way of doing:
Code:
if [ something ]; then goto Error; fi
Currently, I'm just doing this on each line of my script, which is kind of annoying:
Code:
./Make.sh clean clobber all | grep "\*\*\*" ; [COLOR=blue]if [ $? != 0 ]; then echo "Error! $0 halted."; exit 1 ; fi[/color]
Also, I noticed that the block in blue is useless for exiting when make fails unless I don't pipe to grep. How can I fix that problem and still filter the output through grep?