Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Actually....' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Actually....
Authored by: hjeff on Sep 10, '03 04:02:15PM
I can't figure out how to edit that old entry, but here's a better version of the above (the one above gave false positives) :
#!/bin/sh
filein=$1
cocoaCount=`grep -rIh 'NS' "$filein" | grep -v Java | wc -l`
javaCount=`grep -rIh 'Java' "$filein" | wc -l`
if [ $cocoaCount -ge 1 ]
then
        echo "cocoa"
elif [ $javaCount -ge 1 ]
then
        echo "java"
else
        echo "carbon"
fi


[ Reply to This | # ]