Sponsored Content
Full Discussion: echo statement
Top Forums Shell Programming and Scripting echo statement Post 56327 by norsk hedensk on Thursday 30th of September 2004 08:44:47 PM
Old 09-30-2004
you could store the results of the expression in a variable.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl equivalent of ksh if / echo statement

Is there an equivalent perl statement for the following ksh statement ? example if then ... else ... fi (2 Replies)
Discussion started by: gefa
2 Replies

2. Shell Programming and Scripting

Insert TAB in echo statement

Hi, Can some1 help me to output a tab in an echo statement. I have tried echo "RNC: \t NODEB" but dont get the correct output. I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies

3. Shell Programming and Scripting

echo statement issue

Hi All, I am pasting my code below if # e means file exists then echo OFR_Configlist exists >> OFR_Backup_Configfiles.log else echo OFR_Configlist Not exists >> OFR_Backup_Configfiles.log exit fi How can i show the echo message in console also at the same time? I dont want to write... (3 Replies)
Discussion started by: subin_bala
3 Replies

4. Shell Programming and Scripting

setting width in echo statement

Hello All, I need to set the width or number of columns for my dynamic output in the echo statement. statement is like: echo " <output> " here the <output> is dyamice and can be of any number of characters, the " " should always start in same column everytime it is... (4 Replies)
Discussion started by: s123.radha
4 Replies

5. Shell Programming and Scripting

Output of both the echo statement in one line

I have script like echo -n FINISHED FEXP: ${TABLE2EXP} echo $STATUS I want the output of both the echo statement in one line How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies

6. Shell Programming and Scripting

how to read a file to an echo statement

I was searching for an option where i can echo some strings together with the contents of a file. Eg. I was to echo the below string to a file "alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt The value 2009 is coming from a file called date.txt without the... (3 Replies)
Discussion started by: Celvin VK
3 Replies

7. UNIX for Dummies Questions & Answers

echo statement when find returns null

Hi, How do you echo something once when a find statement returns null results? This is when using mutiple locations and mutiple arguments. The below find command the inner loop of a nested for loop where the outter loop holds the $args and the inner loop holds the locations. find... (2 Replies)
Discussion started by: tchoruma
2 Replies

8. Shell Programming and Scripting

concatinate a string with output of echo statement

I need to concatinate a string (mapping-expression) with the output of below statement EXPRESS="cat //normalization-binding//tag-normalization/tag-name" echo $EXPRESS | xmllint --shell QA_Oct12_DIR.cfb | grep -v "/ >" >> "/home/testBinding.txt" above statement write value="$6061" into... (1 Reply)
Discussion started by: bkc
1 Replies

9. Shell Programming and Scripting

Show "\n" in echo statement

Hi, I have below statement: echo ""print LOG \n"" Here, I get output: print LOG n But, I want output like this: print LOG \n Can someone please suggest the remedy for this? (5 Replies)
Discussion started by: jal_capri
5 Replies

10. Shell Programming and Scripting

If echo statement return false

I have this code that sometimes return a false value and the code inside the if statement gets executed and error out. Any idea why? thanks. So I set a debug and see what the value for $ScriptElapsedTime Here is the value I got ScriptElapsedTime='03:20'. Base on this value the if... (10 Replies)
Discussion started by: nugent
10 Replies
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 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)
All times are GMT -4. The time now is 09:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy