Sponsored Content
Full Discussion: Save TCL Procedure Output
Top Forums UNIX for Dummies Questions & Answers Save TCL Procedure Output Post 302146553 by sanjustudy on Wednesday 21st of November 2007 06:00:01 AM
Old 11-21-2007
Save TCL Procedure Output

Hi

vim sample.tcl

/usr/bin/tclsh

proc power { a b } {
puts "$a --- $b"
}

close the program
from the command prompt

$path/wish sample.tcl 5 6 >> output.txt

hope u got it

Regards,
Sanju.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to save the output of command in tcl/expect

hi, everyone: I just wonder how to save the output of command, I mean everything, save as a string into a variable. another question is I try to ls the details of a directory, but it works in the shell, not in the script. for example code: ls -ltr *se100* | grep ^- | tail -1 | awk '... (1 Reply)
Discussion started by: allenxiao7
1 Replies

2. Shell Programming and Scripting

Problem capturing output in TCL script

I have a TCL script that logs into a switch using expect.I send a command "show port-security address" and it returns a table having a large number of rows.I need to capture this output(the table) and store it in a .txt file. I have done this: match_max 5000 set expect_out(buffer) {} set... (0 Replies)
Discussion started by: plasmalightwave
0 Replies

3. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

4. Shell Programming and Scripting

Help to get the Output of PL/SQL procedure In a Excel or Text File

Hi, Could anyone please guide me to get the output of the PL/SQL procedure in a Excel file or Text File... Thanks (1 Reply)
Discussion started by: funonnet
1 Replies

5. Shell Programming and Scripting

Capturing output of procedure in variable in shell script

Hi guys I am calling one DB2 stored proc through unix. It is giving me below output. I want to capture the value 150 in one UNIX variable in shell script. Please let me know how I can achieve this. Thanks in advance Value of output parameters -------------------------- Parameter Name :... (5 Replies)
Discussion started by: vnimavat
5 Replies

6. Shell Programming and Scripting

how can save output?

I make shell script by use "if" statement, what should add it to shell script save which I enter it in output file txt? ---------- Post updated at 08:27 AM ---------- Previous update was at 05:59 AM ---------- I mean like this echo "enter your name" read name # now i when start... (1 Reply)
Discussion started by: Oman_Member
1 Replies

7. Shell Programming and Scripting

Tcl:Very strange output!!

Hi, I using tcl script to perform certain conditions. Part of the results should have average . I couldn't figure out what 's the cause as the result of the average is Zero. Example of the case???? #!/usr/bin/tclsh set counter 500 set total 1000 puts "Total num: $total \n" puts ... (3 Replies)
Discussion started by: ENG_MOHD
3 Replies

8. Shell Programming and Scripting

Script to give plsql procedure output

##Execute the EDW_MEM_KEY_UPDATE procedure ext_sta=`sqlplus -s ${Connstr} <<eof set heading off; set pagesize 0; set feedback off; set serveroutput on; execute EDW_MEM_KEY_UPDATE ; quit; here` vara="ORA-" var=`echo $ext_sta | grep -c $vara ` Hi All, above is a part of my unix... (7 Replies)
Discussion started by: iamnoone
7 Replies

9. Shell Programming and Scripting

ksh and Oracle stored procedure output in logfile

Friends, I pass some runtime arguments (date, number) through ksh script to Oracle procedure, use input value and pass it on to procedure. Oracle procedure gets input value, run query and logs everything in the logfile. I'm facing with couple of challenges 1. Even though I pass all... (5 Replies)
Discussion started by: homer4all
5 Replies

10. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
TclXInit(TCL)															     TclXInit(TCL)

NAME
Tclx_Init, Tclxcmd_Init, TclX_Main, Tkx_Init, TkX_Main - Extended Tcl initialization. SYNOPSIS
-ltclx -ltcl #include "tclExtend.h" int Tclx_Init (Tcl_Interp *interp); int Tclxcmd_Init (Tcl_Interp *interp); int void TclX_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); int Tkx_Init (Tcl_Interp *interp); void TkX_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); void TclX_SetAppInfo (int defaultValues, char *appName, char *appLongName, char *appVersion, int appPatchlevel); DESCRIPTION
These functions are used to initialize Extended Tcl and applications based on Extended Tcl. This manual page also discusses various issues and approaches of integrating TclX into other applications. Tclx_Init Initializes Extended Tcl, adding the extended command set to the interpreter. This is called from Tcl_AppInit. This function must be called after the Tcl_Init function. In addition to the standard command set, it enables use of tlib packages libraries and makes the stan- dard TclX library available. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. Tclxcmd_Init Add the TclX command set to the interpreter, with the exception of the TclX library management commands. This is normally called by Tclx_Init and should only be used if you don't want the TclX library handling. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. TclX_Main This function parses the command line according to the TclX shell specification (Unix shell compatible). It creates an interpreter and calls the specified function appInitProc to initialize any application specific commands. It then either evaluates the command of script specified on the command line or enters an interactive command loop. This procedure never returns, it exits the process when it's done. Using the TclX shell also gives you SIGINT handling in interactive shells. Tkx_Init Initializes Extended Tcl Tk environment. This is called from Tcl_AppInit after the Tk_Init function. Parameters o interp - A pointer to the interpreter to add the commands to. Returns: TCL_OK if all is ok, TCL_ERROR if an error occurred. TkX_Main This function parses the command line according to the wish shell specification. It creates an interpreter and calls the specified func- tion appInitProc to initialize any application specific commands. It then either evaluates the command of script specified on the command line or enters an interactive command loop. This procedure never returns, it exits the process when it's done. Using the TclX wish shell gives you SIGINT handling in interactive shells, otherwise it is identical to standard wish. TclX_SetAppInfo Store the application information returned by infox. Parameters o defaultValues - If true, then the values are assigned only if they are not already defined (defaulted). If false, the values are always set. o appName - Application symbolic name. o appLongName - Long, natural language application name. o appVersion - Version number of the application. o appPatchlevel - Patch level of the application. If less than zero, don't change. String pointers are saved without copying, don't release the memory. If the arguments are NULL, don't change the values. DYNAMIC LOADING OF TCLX
TclX can be dynamically loaded on systems that support shared libraries and the load command. This can be done using either the load or the package require commands. If package require is to be used, a pkgIndex,tcl must be constructed. The pkg_mkIndex does not generate a pkgIndex.tcl file that works with TclX. Instead a command similar to package ifneeded Tclx 7.5.0 "load $dir/libtclx.so" should be placed in the directory containing the TclX shared library. A prototype pkgIndex,tcl file is build by TclX and is installed in the run time directory under the name pkgIndex,proto. This file can't be used as-is, but should be renamed and copied or combined with an existing pkgIndex,tcl in the directory containing the shared library. There is no need to dynamically load libtkx.so, since it only contains support for wishx. INTEGRATING TCLX WITH OTHER EXTENSIONS AND APPLICATIONS
The main aspects to integrating TclX with into an application is to decide if the application is based on the standard Tcl/Tk shells or the TclX shells. If the standard shells are desired, then all that is necessary is to call Tclx_Init after Tcl_Init and Tkx_Init after Tk_Init. This functionality may also be dynamically loaded. To get the TclX shell in a Tcl only application, with the tcl command functionality, call TclX_Main from the main function instead of Tcl_Main. This shell has arguments conforming to other Unix shells and SIGINT signal handling when interactive,. To get the Tclx shell in a Tk application, with the wishx command functionality, call TkX_Main from the main function instead of Tk_Main. This shell has SIGINT signal handling when interactive, Tcl TclXInit(TCL)
All times are GMT -4. The time now is 08:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy