Small Script
I've been trying to creat a small script so it would we able to say Hi from 8:00 to 5:00pm and Good bye form 5:00pm to 11:00pm but nothing seems to work.
Please help me Thanks |
Friendly Scripting
Note: You are using RedHat Linux w/ Bash installed
#!/bin/bash time=`/sbin/hwclock | cut -d: -f1 | cut -d' ' -f4` if [ $time \> 8 ]; then if [ $time \< 5 ]; then echo "Hello, $USER" fi else echo "Good Bye, $USER" fi If it is meant to be put in the login file then out in the apporpriate one. |
|
All times are GMT -5. The time now is 07:59 PM. |