Script which will run every 10minutes and Send SMS to mobile


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Script which will run every 10minutes and Send SMS to mobile
# 8  
Old 11-11-2010
Hi,

I just firt tried this way. But it giving errors

#! /bin/ksh
su - oracle
count=$( sqlplus -s abc/abc@mydb @select count(*) from xyz.order where create_date < sysdate - 1/720; )



But output has error Syntax error: `(' is not expected.

how to fix?

Meanwhile in IF THEN statement I want to append output count in simple txt file. How to add?
if [ $count -gt 20 ]
then
# Coutput will be in txt file. And will append the output in same file
fi


---------- Post updated at 04:30 PM ---------- Previous update was at 03:16 PM ----------

Hi guys,

i do able to connect to oracle. Infact, i need to export env variable.

[I]#! /bin/ksh
export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2
/opt/oracle/app/oracle/product/9.2/bin/sqlplus -s abc/abc@mydb @myquery.sql
exit


But exit is not working here. I need to put manually exit command. What to do?

---------- Post updated at 04:47 PM ---------- Previous update was at 04:30 PM ----------

Sorry guys for too many message. i will write my query in other message. Ignore this THREAD. Moderator also can delete it.
# 9  
Old 11-11-2010
are you exiting properly in your @myquery.sql file ?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Send SMS to mobile

Hello Folks, I need to send the output from shell script to range of mobile phones based on their msisdn . Is there any open source solution could help me to do so from CentOS or redhat ?? (11 Replies)
Discussion started by: arm
11 Replies

2. AIX

send SMS via curl

I need from aix to send an SMS, you know if the command curl serves me (3 Replies)
Discussion started by: tricampeon81
3 Replies

3. UNIX for Dummies Questions & Answers

Need to set up UNIX script to send sms on mobile

Hi All, Can anyone please help in setting up Unix script for sending text messages on mobile?? Actually scenario is we want notification when there is any failures in our processes or if any service goes down we must be notified by a text message on our mobile, we already have email... (3 Replies)
Discussion started by: NikhilM
3 Replies

4. Shell Programming and Scripting

Bash script to send SMS

Hey guys I was wondering how to go about creating a bash script to send SMS..any ideas are appreciated.. (2 Replies)
Discussion started by: blackzeus
2 Replies

5. AIX

AIX Send SMS Directly

Any script / program / command can be run directly to send SMS directly on AIX ? Thanks (2 Replies)
Discussion started by: look1
2 Replies

6. IP Networking

Send SMS from PC to mobile phones

Hi All, Can any expert provide me a guide on how i can send SMS from pc to mobile phone using VBA or some other language ? I am a newbie in networking. (1 Reply)
Discussion started by: Raynon
1 Replies

7. UNIX for Advanced & Expert Users

Unix shell Script To Send SMS

hi , can anyone help with a script to send SMS to some mobile numbers on some conditions. (1 Reply)
Discussion started by: sdcoms
1 Replies

8. Programming

can anyone send sms application

actually i need this sms application ,to gain some knowledge in linux platform. (1 Reply)
Discussion started by: parvathy
1 Replies
Login or Register to Ask a Question