Hey Richard,
For both of those, you can capture the output of your test commands using backticks (will work in any shell) or the $() test in bash
For instance, you could take your statement:
and assign it to a variable
or
and then test that variable, for example:
if [ $xceeded == "exceed" ]
then
do what have to do
fi
Let me know if that's enough of a nudge in the right direction. You're almost there 
Best wishes,
Mike
Thanks Mike! I'm almost there... I've changed it just a bit to the following:
#!/bin/bash
#dynamips.sh
xceedPROC=$(ps -ef | awk '/dynamips/ {print $10}' | awk 'END {print NR,"Total"}' | awk '/Total/ {if ( $1 > 4) print "exceed"}')
xceedCPU=$(mpstat | awk '/all/ {if ($4 > 20) print "exceed"}')
if [ ($xceedPROC == "exceed") -o ($xceedCPU == "exceed") ]
then
echo "Server Resources out of tolerance, please try another Server"
else
`nice /$HOME/dynamips/dynamips -H $1 &`
fi
My only problem now is the 'if' line is not working. I'm trying to have it check if $xceedPROC or $xceedCPU = exceed then stop.
I'm going to keep researching and will let you know if I figure it out.
Thanks,
Richard