pls help me in scripting


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users pls help me in scripting
# 1  
Old 09-03-2007
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  
Old 09-03-2007
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  
Old 09-03-2007
thanks

Quote:
Originally Posted by anchal_khare
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  
Old 09-04-2007
Hi,

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

-Sethu.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell scripting : pls help me

I have an input file in this format (shown below). I have to select the lines which doesnt followed by 'miR-" and to save such lines into an output file. For easy identification they are shown here in blue color. They have to be selected. Pls. help me to write a shell script to select those lines... (5 Replies)
Discussion started by: hravisankar
5 Replies

2. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

3. Shell Programming and Scripting

scripting/awk help : awk sum output is not comming in regular format. Pls advise.

Hi Experts, I am adding a column of numbers with awk , however not getting correct output: # awk '{sum+=$1} END {print sum}' datafile 2.15291e+06 How can I getthe output like : 2152910 Thank you.. # awk '{sum+=$1} END {print sum}' datafile 2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies

4. Shell Programming and Scripting

Pls Help

Hi Folks, I am new to this forum. and I just started learning shell scripting. I have a file called energy.out which looks like: -218213.3729 -224215.0059 -221509.3651 -221094.2627 -220660.3223 -222630.2339 -218697.8693 Now I want to calculate the average of energies and then average... (3 Replies)
Discussion started by: pkar
3 Replies

5. Shell Programming and Scripting

pls help

Hi, I need your help guys. I have two data files, namely 101.amberized.pdb & 101.pdb . Now I want to replace the whole 3rd column of 101.amberized.pdb with the 3rd column of 101.pdb file. How do I do it in shell? Thanks in advance Parimal (11 Replies)
Discussion started by: chuchu
11 Replies

6. Shell Programming and Scripting

hi..all..pls...help..!!..profile scripting..

hi.. I want to customize a user in unix which could have only ftp access and NO TELNET ACCESS! ..... As being a newbie to unix to my understanding the user .profile has to be edited but if someone can explain how to edit it so that i can block telnet access for that user.....Is /etc/profile has... (5 Replies)
Discussion started by: rookie250
5 Replies

7. Shell Programming and Scripting

HELP PLS!! Shell Scripting!!

Dear All, forgive me as i am a complete beginner in shell scripting in UNIX. I have a file with data similair to the following 8 McDonalds Sandwich 1.99 9 Mcdonalds Fries 1.20 13 McDonalds Milkshake 1.20 7 ... (9 Replies)
Discussion started by: Mary_xxx
9 Replies

8. Shell Programming and Scripting

HELP me PLS... Simple Scripting!

this is my script.... SQL> select * from dba_profiles 2 where resource_name in ('FAILED_LOGIN_ATTEMPTS','PASSWORD_LOCK_TIME') 3 order by profile; and this is the output... PROFILE RESOURCE_NAME RESOURCE... (2 Replies)
Discussion started by: liezer
2 Replies

9. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies

10. Linux

pls help me

we hv a big enviroment networked. we use squid proxy. access allowed by src address previously. we have win2000 network with ads. my requirement is the proxy should allow domain users only for access. how can i map my windows userdatabase with squid is there any thing specific which has 2 b... (1 Reply)
Discussion started by: sriram.s
1 Replies
Login or Register to Ask a Question