05-04-2011
there's nothing inside the .profile. it's just contain the HISTFILE and PATH. the path is already defined on the script. Actually the script runs but stop on the part
export INFORMIXDIR=$IFXDIR
export INFORMIXSERVER=$IFXINS
export ONCONFIG=$IFXCFG
export PATH=$IFXDIR/bin:$IFXDIR/lib:/usr/bin:/usr/local/bin:/etc:/usr/sbin:/sbin:/bin
echo "INFORMIXDIR ="$IFXDIR >> space_out1.log
echo "INFORMIXSERVER ="$IFXINS >> space_out1.log
echo "ONCONFIG ="$IFXCFG >> space_out1.log
echo "PATH ="$PATH >> space_out1.log
I can see the values of the above parameters and all of those are good.
if [ $db_is_up -eq 1 ]; then
.......
fi
originally, this is the code, but this does not work.
if [-n "`onstat - 2>/dev/null | grep Up`" ]; then
echo "PAGESIZE" ......
fi
I decided to set it to
db_is_up=`onstat - 2>/dev/null | grep Up | wc -l`
if [ $db_is_up -eq 1 ]; then
echo ......
fi
Any idea on the korn shell side? is the logic correct? Although, i doubt it is something from the environment settings, I can't figure out what is missing as the variables above are the on needed.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies
2. Shell Programming and Scripting
The following script is designed to backup the oracle control file to the trace directory and then copy (the trace file that was created by the backup command) and rename that file(to a .sql) to a backup disk. When I run the script from sqlplus as sysdba everything works but when I execute from... (1 Reply)
Discussion started by: tparker123
1 Replies
3. Shell Programming and Scripting
Hi,
Running Oracle Scheduler 11g2 on an AIX 6.01.
I want to run a shell script (called "external program" in Oracle terminology) which executes some commands and react on the outcome using the exit status $?. For example a "cat thisfiledoesnotexist" and then get the $? which should be not zero.... (6 Replies)
Discussion started by: hermanmol
6 Replies
4. Shell Programming and Scripting
Hi All
I am not an expert at shell programming. But in the process of learning. But I have a requirement it goes as follows :
Requirement 1:
I have a series of files that keep comming on a unix folder every hour. The files names are different. As soon as a file arrives in this folder I will... (3 Replies)
Discussion started by: srivi_xinu
3 Replies
5. Shell Programming and Scripting
I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10.
If I do a grep -i version /usr/dt/bin/dtksh I get
@(#)Version M-12/28/93d
@(#)Version 12/28/93
@(#)Version M-12/28/93
This is correct for... (5 Replies)
Discussion started by: thibodc
5 Replies
6. Shell Programming and Scripting
Here's the script:
#!/usr/bin/ksh
Date=`date +%m%d%y`
CDate=`date`
FileName=cintas_hosts_and_users.$Date
echo $CDate >> $FileName
#echo $FileName
for host in `cat /collect/itthomp/cintas_hostnames.dat`
do
echo $host >> $FileName
ssh $host "awk -v Fname=$FileName -F: '{if($1 != "root"... (3 Replies)
Discussion started by: jgt157
3 Replies
7. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
8. Shell Programming and Scripting
Hi
I am not able to execute a script with ksh. Its not giving any error too.
I have tried with absolute path /usr/bin/ksh test.sh .
Also checked path variable and all looks fine
It runs fine with sh.
OS is solaris 10. (9 Replies)
Discussion started by: ningy
9 Replies
9. UNIX for Dummies Questions & Answers
hi forums, can you help me on how to make cd and mv code work in this script?
#!/bin/ksh
#i got it from: https://www.unix.com/shell-programming-and-scripting/107612-how-tar-compress-remove-files-older-than-two-days.html
MAIN_DIR=/home/user/pumela
find ${MAIN_DIR} *.txt -mtime -3> FILE_LIST... (7 Replies)
Discussion started by: phumaree
7 Replies
10. Red Hat
I am Not sure why following script is not capturing the counts only when using crontab !! when I run it fromt he command line it is fine ! what is missing here !
#!/usr/bin/ksh
host=`uname -n`
tdate=`date`
userid='dbid/password'
totalevents=`sqlplus -s $userid << -
set timing off
... (1 Reply)
Discussion started by: mrn6430
1 Replies
LEARN ABOUT HPUX
scheduler
ICECREAM(1) Icecream User's Manual ICECREAM(1)
NAME
scheduler - Icecream scheduler
SYNOPSIS
scheduler [-n | --netname name] [-p | --port port] [-h | --help] [-l | --log-file file] [-d | --daemonize] [-r | --allow-run-as-user]
[-v [v [v]]]
DESCRIPTION
The Icecream scheduler is the central instance of an Icecream compile network. It distributes the compile jobs and provides the data for
the monitors.
OPTIONS
-n, --netname netname
The name of the Icecream network the scheduler controls.
-p, --port port
IP port the scheduler uses.
-h, --help
Print help message.
-l, --log-file logfile
Name of file where log output is written to.
-d, --daemonize
Detach daemon from shell.
-v, -vv, -vvv
Control verbosity of daemon. The more v the more verbose.
-r, --allow-run-as-user
Force running the scheduler with user rights. Usually you will need to run the scheduler with root rights.
SEE ALSO
icecream, scheduler, iceccd, icemon
AUTHOR
Cornelius Schumacher
Icecream April 21th, 2005 ICECREAM(1)