Hey guys.
How would I go about extracting the time from the system clock and inserting it into a variable?
Any thoughts?
Hey guys.
How would I go about extracting the time from the system clock and inserting it into a variable?
Any thoughts?
Look at the date command. The different formats will allow you to save that value in a variety of ways.
I think I got it,
ts=`date +%H%M`
Thanks again.
I was givin the task to, Glean the time only and write a small script that echo's before or after the time you specify.
Would this work:
ts=`date +%H%M`
echo ts
if ts > 0900
echo after
else
echo before
fi
Is this homework? If it is, its against the rules.