I have gotten the script up to this point and it works fine a system but when i copy it to another unix server running solaris 9 as the original one , its gives an error './mon_fs.sh: 0: unknown test operator' .
(see script bellow)
can the Gurus see to this as i am just a beginner with... (2 Replies)
Hi,
I have the following shell script :
Nbr_BD_Link=0
Nbr_BD_Link=`
sqlplus sysadm/${PSWD}@${DB_Name} << EOF | tail -4 | head -1 2>/dev/null
set head off feedback off ;
select count(*) from dba_db_links ;
exit ;
EOF `
echo ${Nbr_BD_Link}
if ; then
... (4 Replies)
hi
I get test: unknown operator status
if
then
echo "OK."
return 0
else
echo "not ok" 2>&1
exit -1
fi
I tried to change "A" with 'A' --> same error
I tried to change
if , I am getting: (3 Replies)
I'm almost pulling out my hair trying to figure out what's wrong with this... there's no reason I can see that it shouldn't be working. It seems that the code acts as though the conditional statement is true no matter what - I've even tried removing the negation operator, but it always goes into... (5 Replies)
hi all, i am using the below command in my script
if ; then
This statement is causing the problme "ScriptName.ksh: XXX-XXX: unknown test operator"
could you please suggest me , how can i avoid these messages.
Singhal (7 Replies)
Hello people,
I created the below script on HP-UX
#!/bin/sh
SESSION_NO=`sqlplus -s ${DRBILOUKOS_USER} <<EOF
SET HEAD OFF
@/export/home/drbiloukos/scripts/sessions_count/no_of_sessions.sql
EOF`
SESSION_THRESHOLD=250
MAX_SESSIONS=`sqlplus -s ${DRBILOUKOS_USER} <<EOF
SET HEAD OFF... (2 Replies)
In my script (currently running on Solaris ) I'm testing for zero size with wild character. There are mutilple files exist in the directory.
if
then
filename=`ls -1tr ${fileformat}.${date}.? | tail -1`
else
${BATCH_FATAL:-echo} "$0:ERROR:No file found ${source}/${fileformat}.${date}.?"... (5 Replies)
Hi ,
Os - Solaris
Shell - Ksh
I am getting below error in if condition
+ id
+
./om_wf_complete.sh: gid=4081(Infadmn): unknown test operator
+ exit 1
if ; then
touch /home/odwt/1.0.0/out/oworkflow.dat
chmod 777 /home/odwt/1.0.0/out/oworkflow.dat
elif ; then
touch... (8 Replies)
Hello, can you please help me because I am totally confused with a simple script:
#!/bin/bash
] || ] && echo "Good Morning"
] || ] && echo "Good Night"
For me, these two strings are indentical: false || false and there is no point to execute echo command.
But the run result is... (5 Replies)
O/S solaris 9
shell ksh
if
then
chk_op="WARNING...reboot within the last 24hrs, restarted at `who -r | awk '{print $4$5"@"$6}'`" ;
else
if ;
then
last_reboot1=`who -b | awk '{print $4" "$5" "$6}'`
last_reboot2='..OK..'`uptime | awk '{print$3" "$4}'`
... (4 Replies)
Discussion started by: squrcles
4 Replies
LEARN ABOUT SUNOS
search
search.h(3HEAD) Headers search.h(3HEAD)NAME
search.h, search - search tables
SYNOPSIS
#include <search.h>
DESCRIPTION
The <search.h> header defines the ENTRY type for structure entry, which includes the following members:
char *key
void *data
and defines ACTION and VISIT as enumeration data types through type definitions as follows:
enum { FIND, ENTER } ACTION;
enum { preorder, postorder, endorder, leaf } VISIT;
The size_t type is defined as described in <sys/types.h>. See types.h(3HEAD).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO hsearch(3C), insque(3C), lsearch(3C), tsearch(3C), types.h(3HEAD), attributes(5), standards(5)SunOS 5.10 10 Sep 2004 search.h(3HEAD)