bash script - how to create and store user activity -
i writing script far created log-in scheme want create .db file store user activity store time logged in, logged out , when did order meal.
this little script wrote
#!/bin/bash function login_system(){ printf "%s\n" "write username below" read user grep ^"$user:" /etc/pass > /dev/null if [ $? -eq 0 ] printf "%s" "confirmed" sleep 2 menu_system else printf "%s" "denied" sleep 2 login_system fi } function menu_system(){ printf "%s\n" "press 1 order breakfast , 2 exit" read order if [ $order -eq 1 ] . breakfast printf "%s\n" "returing menu system" sleep 3 menu_system else exit fi } login_system exit 0 i dont know how implement user activity script, tried researching couldn't find anything. guide or help appreciated.
this looks homework problem, i'll reply resource: how redirect script output file.
if question actual production system, crazy. not implement systems in bash.
bash
No comments:
Post a Comment