On Friday 25 March 2011 05:56 PM, Binand Sethumadhavan wrote:
2011/3/25 Rony Billgnulinuxist@gmail.com:
if grep -q "$USER" present then echo "Sorry! You have already logged in today."
I have several comments on style and other issues, but this snippet is plain buggy. Imagine two users, prabhakaran and karan. If the former has marked his attendance, this code will not allow the latter to do so at all.
I will check it out. There must be some grep option to look for absolute values. I did find some extra code that could be removed. For eg. The streamer and convert can use the same name for the jpeg and avoid the rm -rf $USER.jpeg line.