9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies
2. Shell Programming and Scripting
Hello,
The problem I met is the conflict between the default command /usr/bin/sometools, which is an very old version at system setup, and an updated one I have installed in $HOME/download-software/sometools
How do I tell a third program to use the customized sometools instead of the default... (6 Replies)
Discussion started by: yifangt
6 Replies
3. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
4. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
5. Shell Programming and Scripting
Hello All,
I had just a question about my Bash Script I'm currently writing.
The script I have writes some text to a output file. After I write to the output file I send the file to another server to do
some stuff with it.
After the file sends in the script, I don't need the output/txt... (4 Replies)
Discussion started by: mrm5102
4 Replies
6. UNIX for Dummies Questions & Answers
my script is:
awk '...mycode...' file1.txt > file2.txt
and i want to overwrite file2.txt eachtime I run this script. but it says:File exists! :( I have tried
awk '...mycode...' file1.txt >| file2.txt but it again says:Missing name for redirect! :confused::confused:
what is this? (2 Replies)
Discussion started by: gc_sw
2 Replies
7. Shell Programming and Scripting
Hi,
i have a file ver.sql with the following contents , Here i need to put a in the next line of END statment .
So iam doing the following
D:\>type ver.sql
begin
ctxsys.driimp.set_value('STOP_WORD','yours');
ctxsys.driimp.set_object('STORAGE','BASIC_STORAGE',2);... (1 Reply)
Discussion started by: mhdmehraj
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
im using the following to copy a file to a directory, the user being prompted to overwrite if the file already exists in that directory,
cp -i myfile /home/brief/bin2
but this reveals the path of the directory when being prompted to overwrite (below)
cp: overwrite... (2 Replies)
Discussion started by: ali999
2 Replies
9. UNIX for Dummies Questions & Answers
if i want to pipe output to a file, say,
cat abc.dat > abc.txt, how do i make it replace the existing file? (9 Replies)
Discussion started by: Duckman
9 Replies
memory(n) Tcl Built-In Commands memory(n)
__________________________________________________________________________________________________________________________________________________
NAME
memory - Control Tcl memory debugging capabilities
SYNOPSIS
memory option ?arg arg ...?
_________________________________________________________________
DESCRIPTION
The memory command gives the Tcl developer control of Tcl's memory debugging capabilities. The memory command has several suboptions,
which are described below. It is only available when Tcl has been compiled with memory debugging enabled (when TCL_MEM_DEBUG is defined at
compile time), and after Tcl_InitMemory has been called.
memory active file
Write a list of all currently allocated memory to the specified file.
memory break_on_malloc count
After the count allocations have been performed, ckalloc outputs a message to this effect and that it is now attempting to enter the
C debugger. Tcl will then issue a SIGINT signal against itself. If you are running Tcl under a C debugger, it should then enter
the debugger command mode.
memory info
Returns a report containing the total allocations and frees since Tcl began, the current packets allocated (the current number of
calls to ckalloc not met by a corresponding call to ckfree), the current bytes allocated, and the maximum number of packets and
bytes allocated.
memory init [on|off]
Turn on or off the pre-initialization of all allocated memory with bogus bytes. Useful for detecting the use of uninitialized val-
ues.
memory objs file
Causes a list of all allocated Tcl_Obj values to be written to the specified file immediately, together with where they were allo-
cated. Useful for checking for leaks of values.
memory onexit file
Causes a list of all allocated memory to be written to the specified file during the finalization of Tcl's memory subsystem. Useful
for checking that memory is properly cleaned up during process exit.
memory tag string
Each packet of memory allocated by ckalloc can have associated with it a string-valued tag. In the lists of allocated memory gener-
ated by memory active and memory onexit, the tag for each packet is printed along with other information about the packet. The mem-
ory tag command sets the tag value for subsequent calls to ckalloc to be string.
memory trace [on|off]
Turns memory tracing on or off. When memory tracing is on, every call to ckalloc causes a line of trace information to be written
to stderr, consisting of the word ckalloc, followed by the address returned, the amount of memory allocated, and the C filename and
line number of the code performing the allocation. For example:
ckalloc 40e478 98 tclProc.c 1406
Calls to ckfree are traced in the same manner.
memory trace_on_at_malloc count
Enable memory tracing after count ckallocs have been performed. For example, if you enter memory trace_on_at_malloc 100, after the
100th call to ckalloc, memory trace information will begin being displayed for all allocations and frees. Since there can be a lot
of memory activity before a problem occurs, judicious use of this option can reduce the slowdown caused by tracing (and the amount
of trace information produced), if you can identify a number of allocations that occur before the problem sets in. The current num-
ber of memory allocations that have occurred since Tcl started is printed on a guard zone failure.
memory validate [on|off]
Turns memory validation on or off. When memory validation is enabled, on every call to ckalloc or ckfree, the guard zones are
checked for every piece of memory currently in existence that was allocated by ckalloc. This has a large performance impact and
should only be used when overwrite problems are strongly suspected. The advantage of enabling memory validation is that a guard
zone overwrite can be detected on the first call to ckalloc or ckfree after the overwrite occurred, rather than when the specific
memory with the overwritten guard zone(s) is freed, which may occur long after the overwrite occurred.
SEE ALSO
ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG
KEYWORDS
memory, debug
Tcl 8.1 memory(n)