Detailed explanation of daily_routine instance code in linux
- 2021-07-03 01:16:18
- OfStack
First look at the example code:
#/bin/bash
cal
date -u
echo "Hello,welcome ${LOGNAME} ! A full day has begun!"
read -p "input your pass word!" pwd
if test $pwd == "123"
then
echo "Your login sucessfully!"
for file in /tmp/*
do
echo $file
done
else
echo "Deny logon"
fi
cal Print Calendar
date-u Displays or Sets Global Time (Greenwich Mean Time)
${LOGNAME} currently logged on user
The above example is very simple, we can try to test under, thank you for learning and support for this site.