The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ksh scripting help praveenbvarrier Shell Programming and Scripting 1 04-15-2008 07:19 AM
sql scripting help sam786 Shell Programming and Scripting 3 12-10-2007 08:31 AM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 05:12 AM
scripting guru's pls help me with scripting on AIX thatiprashant Shell Programming and Scripting 1 01-20-2006 03:58 PM
Scripting? woofie What's on Your Mind? 1 03-09-2005 03:03 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-02-2007
Registered User
 

Join Date: Aug 2007
Posts: 19
Stumble this Post!
Question pls help me in scripting

i want to write a script that if the time is 8 then it give a message that the time is 8 and if it is 9-10 then it gives a message that time to go to office like that.
can any one help me?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 98
Stumble this Post!
x=`date +"%H"`
if [ $x == "08" ]
then
echo "Stay at home"

elif [ $x == "09" ] || [ $x == "10" ]
then
echo "Go office"
else
echo "do what ever u want "
fi
Reply With Quote
  #3 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Aug 2007
Posts: 19
Stumble this Post!
thanks

Quote:
Originally Posted by anchal_khare View Post
x=`date +"%H"`
if [ $x == "08" ]
then
echo "Stay at home"

elif [ $x == "09" ] || [ $x == "10" ]
then
echo "Go office"
else
echo "do what ever u want "
fi
thanks for ur message but i want to execute that even if i closed the terminal?
Reply With Quote
  #4 (permalink)  
Old 09-04-2007
Registered User
 

Join Date: Jul 2007
Posts: 12
Stumble this Post!
Hi,

What is the use of displaying a message in a closed terminal...?
Make it clear.

-Sethu.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0