05-23-2012
it is an old script, just need it to run on Bash successfully.
the only error i am getting is "INFA_MAP_GEN_XML.sh: line 1117: [: FLAG_TRANS_SOURCE_1: integer expression expected".
pls. let me know if it can be rectified.
10 More Discussions You Might Find Interesting
1. Linux
Hi all,
I'm new in linux. When I try to run a bash script, it doesn't execute and i receive the following error message
20070321:220002|ERROR||exportDatabase.bash|Another EXPORT process (pid=2799) is still running.
If i kill this pid, i receive "No such process".
This process was running... (5 Replies)
Discussion started by: tovohery
5 Replies
2. UNIX for Advanced & Expert Users
# ps -ef | grep rc
root 13903 1 0 08:56 ? 00:00:00 /usr/sbin/automount --timeout=60 /archive file /etc/auto_archive
root 10706 1 0 08:55 ? 00:00:00 /bin/bash /etc/rc.d/rc 3
root 2933 20071 0 19:38 pts/1 00:00:00 grep rc
Is there any way to debug the... (1 Reply)
Discussion started by: marcpascual
1 Replies
3. Shell Programming and Scripting
I have wasted one working day writing this scripts.
It compares two folders and make a good tabbed report about their differences.
#!/bin/bash
function DRAW_DEPTH () {
ROUND=$1
while
do
printf %s " "
ROUND=`expr $ROUND - 1`
done
printf %s "|- "
}
function MAIN () {... (9 Replies)
Discussion started by: trutoman
9 Replies
4. Shell Programming and Scripting
Hello,
Is there some way to validate a bash script before running it. I want to make sure all of the syntax and everything is good so that I dont get a false return code.
Thanks,
tom (7 Replies)
Discussion started by: tjones1105
7 Replies
5. UNIX for Dummies Questions & Answers
Hey guys, so I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into... (4 Replies)
Discussion started by: Duo11
4 Replies
6. UNIX for Dummies Questions & Answers
Hey guys, so I wrote a small script that pretty much just takes in two numbers and counts from the first to the second, e.g.
unknown-hacker|544> count.sh 1 3
1
2
3
My problem is I want to make it so that if you input invalid parameters, such as non-numerical characters, more than 2... (2 Replies)
Discussion started by: Duo11
2 Replies
7. Shell Programming and Scripting
hi guys
we've had nagios spewing false alarm (for the umpteenth time) and finally the customer had enough so they're starting to question nagios. we had the check interval increased from 5 minutes to 2 minutes, but that's just temporary solution. I'm thinking of implementing a script on the... (8 Replies)
Discussion started by: hedkandi
8 Replies
8. UNIX for Dummies Questions & Answers
I wish to be able to give to a client the opportunity to :
0) Turn one of my ubuntu computers into a webserver
1) See a webpage after visiting a url where an external user/client can set a couple of variables (e.g. Number1= ?, Number2=?)
2) By pressing "run" the program runs on my machine
3)... (1 Reply)
Discussion started by: frad
1 Replies
9. Shell Programming and Scripting
Hello UNIX & Linux Forums community! Long time Linux daily user hobbyist, new to shell scripting....
I'm working on a script that does all the "work" in one script, and makes calls to a second script to display info to the user via mostly expanding variables in heredocs.
I'm contemplating... (6 Replies)
Discussion started by: Cody Learner
6 Replies
10. Shell Programming and Scripting
Hello fellow scripters...
I am trying to set up a script for work that reads the contents of a file of IP address and network names, takes these and runs a given nmap scan against them and then saves the output to a file with the filename of the network name.
Such as...
IP file looks like... (4 Replies)
Discussion started by: hawkeyesc72
4 Replies
LEARN ABOUT OPENDARWIN
tcl_exprlongobj
Tcl_ExprLongObj(3) Tcl Library Procedures Tcl_ExprLongObj(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_ExprLongObj, Tcl_ExprDoubleObj, Tcl_ExprBooleanObj, Tcl_ExprObj - evaluate an expression
SYNOPSIS
#include <tcl.h>
int
Tcl_ExprLongObj(interp, objPtr, longPtr)
int
Tcl_ExprDoubleObj(interp, objPtr, doublePtr)
int
Tcl_ExprBooleanObj(interp, objPtr, booleanPtr)
int
Tcl_ExprObj(interp, objPtr, resultPtrPtr)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter in whose context to evaluate string or objPtr.
Tcl_Obj *objPtr (in) Pointer to an object containing the expression to evaluate.
long *longPtr (out) Pointer to location in which to store the integer value of the expression.
int *doublePtr (out) Pointer to location in which to store the floating-point value of the expression.
int *booleanPtr (out) Pointer to location in which to store the 0/1 boolean value of the expression.
Tcl_Obj **resultPtrPtr (out) Pointer to location in which to store a pointer to the object that is the result of the expression.
_________________________________________________________________
DESCRIPTION
These four procedures all evaluate an expression, returning the result in one of four different forms. The expression is given by the
objPtr argument, and it can have any of the forms accepted by the expr command.
The interp argument refers to an interpreter used to evaluate the expression (e.g. for variables and nested Tcl commands) and to return
error information.
For all of these procedures the return value is a standard Tcl result: TCL_OK means the expression was successfully evaluated, and
TCL_ERROR means that an error occurred while evaluating the expression. If TCL_ERROR is returned, then a message describing the error can
be retrieved using Tcl_GetObjResult. If an error occurs while executing a Tcl command embedded in the expression then that error will be
returned.
If the expression is successfully evaluated, then its value is returned in one of four forms, depending on which procedure is invoked.
Tcl_ExprLongObj stores an integer value at *longPtr. If the expression's actual value is a floating-point number, then it is truncated to
an integer. If the expression's actual value is a non-numeric string then an error is returned.
Tcl_ExprDoubleObj stores a floating-point value at *doublePtr. If the expression's actual value is an integer, it is converted to float-
ing-point. If the expression's actual value is a non-numeric string then an error is returned.
Tcl_ExprBooleanObj stores a 0/1 integer value at *booleanPtr. If the expression's actual value is an integer or floating-point number,
then they store 0 at *booleanPtr if the value was zero and 1 otherwise. If the expression's actual value is a non-numeric string then it
must be one of the values accepted by Tcl_GetBoolean such as ``yes'' or ``no'', or else an error occurs.
If Tcl_ExprObj successfully evaluates the expression, it stores a pointer to the Tcl object containing the expression's value at *resultP-
trPtr. In this case, the caller is responsible for calling Tcl_DecrRefCount to decrement the object's reference count when it is finished
with the object.
SEE ALSO
Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean, Tcl_ExprString, Tcl_GetObjResult
KEYWORDS
boolean, double, evaluate, expression, integer, object, string
Tcl 8.0 Tcl_ExprLongObj(3)