10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there,
Now I'm facing error regarding running shell script via cron.
The shell script which is required to get value from database.
Below is the main part of shell script.
#/bin/bash
#connect to database(1)
db2 connect to $database user xxxx using yyyy
#set values from... (3 Replies)
Discussion started by: Rohan Kishibe
3 Replies
2. UNIX for Dummies Questions & Answers
Hi Team,
When i am running the below query manually it is giving me the right output
i.e.
export PATH=/usr/sbin:/usr/bin:/sbin:/bin:$PATH
ADMIN=abc@abc.com
CPU_HIGH=`sar|awk '{print $9}'|sort -n|head -5|sed -n 5p`
CPU_MAX=`echo "scale=3; 100-$CPU_HIGH" | bc`
CPU_LOW=`sar|awk '{print... (13 Replies)
Discussion started by: Ekamjot
13 Replies
3. Solaris
I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t.
count=0
while ; do
sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR... (4 Replies)
Discussion started by: millan
4 Replies
4. Solaris
Hi,
I have a bourne shell script that needs to login into sqlplus and execute a stored procedure. I need this shell script to be run under a user crontab.
It works fine if run under normal shell prompt.
But it gave error message in my log file when run under crontab:
SQL*Plus: Release... (4 Replies)
Discussion started by: joe_x
4 Replies
5. Shell Programming and Scripting
Hi All,
I beginner in unix, i have no idea how to set the script file using cron job every 5 second. I also want to execute automatically the output to text file.This is my script name countsys.sh and my textfile abc.txt. (6 Replies)
Discussion started by: mastercar
6 Replies
6. Shell Programming and Scripting
Hey Guys,
i was trying out a shell script which has to remove a file for every 90 mins. this is the code i came up with .
$ crontab -e file1
file1 contains
30 1 * * * * rm -r /folder1/folder2/somefile.txt
Now i need the cron to run for every 90 mins. the problem with this is... (8 Replies)
Discussion started by: Irishboy24
8 Replies
7. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
8. Shell Programming and Scripting
Hi All,
The script which i am using to SSH to remote server is working fine when i run is using ./ but when cron runs it it gives error that "ssh: not found"
please help!!! (3 Replies)
Discussion started by: visingha
3 Replies
9. SuSE
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies
10. Shell Programming and Scripting
I have a script which connects to different database servers using sqlplus. Is there a way by which I can run a shell command on that host from sqlplus?
I know about 'host' command but it runs script on the local machine where the original script is running. Is there a way to run command on the... (9 Replies)
Discussion started by: dkr123
9 Replies