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 Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 11:19 AM
sql scripting help sam786 Shell Programming and Scripting 3 12-10-2007 12:31 PM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 09:12 AM
scripting guru's pls help me with scripting on AIX thatiprashant Shell Programming and Scripting 1 01-20-2006 07:58 PM
Scripting? woofie What's on Your Mind? 1 03-09-2005 07:03 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-03-2007
lakshmananindia lakshmananindia is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
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?
  #2 (permalink)  
Old 09-03-2007
anchal_khare anchal_khare is offline
Registered User
  
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 325
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
  #3 (permalink)  
Old 09-03-2007
lakshmananindia lakshmananindia is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
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?
  #4 (permalink)  
Old 09-04-2007
r_sethu r_sethu is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 12
Hi,

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

-Sethu.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0