Hi,
I have a data file with following structure:
a|b|c|d|3|f1|f2|f3
a|b|c|d|5|f1|f2|f3|f4|f5
I want to change this data to:
a|b|c|d|3|f1;f2;f3
a|b|c|d|5|f1;f2;f3;f4;f5
Data in column 5 tells the number of following fields. All fields delimiter after the 5th column needs to be... (6 Replies)
For counting the occurences of specific character in the file
I am issuing the command
grep -o 'character' filename | wc -w
It works in other shells but not in HP-UX as there is no option -o for grep.
What do I do now? (9 Replies)
I'm trying to count the number of 2 specific characters in a very large file. I'd like to avoid using gsub because its taking too long.
I was thinking something like:
awk '-F' { t += NF - 1 } END {print t}' infile > outfile
which isn't working
Any ideas would be great. (3 Replies)
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
hi,
I want to store from 102 character to 128 character to a variable of header record which can be identified as 'HDR' which is the first 3 characters in the same line of a same.txt file.
Please advise.
Thanks (4 Replies)
i have a reqirement to adjust the data in a file based on a perticular character
the sample data is as below
483PDEAN CORRIGAN 52304037528955WAGES 50000
89BP ABCD MASTER352 5434604223735428 4200
58BP SOUTHERN WA848 ... (1 Reply)
Greetings Unix exports,
I am facing some problems in combining files with different name patterns with a directory and I would appreciate if you can help me
I have more than 1000 files but they follow a specific pattern of naming. e.g. 64Xtest01.txt
They are divided into two sets of test and... (9 Replies)
This is a file that I have
test line 1 (55)
)
test line 2 (45)
)
I would like to change all the parens in position 1 of this file to a );
i only want to check position 1 in every line of the file. I have tried different varations of sed, but cannot seem to be able to limit it to... (1 Reply)
Hello guys,
I would need to remove the last character ")" of a specific line. This can be from any line. Your help is appreciated. Below is the line.
HOSTNAME=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP))
Please help. (6 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT OPENDARWIN
tcl_initmemory
Tcl_DumpActiveMemory(3) Tcl Library Procedures Tcl_DumpActiveMemory(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory - Validated memory allocation interface.
SYNOPSIS
#include <tcl.h>
int
Tcl_DumpActiveMemory(fileName)
void
Tcl_InitMemory(interp)
void
Tcl_ValidateAllMemory(fileName, line)
ARGUMENTS
Tcl_Interp *interp (in) Tcl interpreter in which to add commands.
CONST char *fileName (in) For Tcl_DumpActiveMemory, name of the file to which memory information will be written. For
Tcl_ValidateAllMemory, name of the file from which the call is being made (normally __FILE__).
int line (in) Line number at which the call to Tcl_ValidateAllMemory is made (normally __LINE__).
_________________________________________________________________DESCRIPTION
These functions provide access to Tcl memory debugging information. They are only functional when Tcl has been compiled with TCL_MEM_DEBUG
defined at compile-time. When TCL_MEM_DEBUG is not defined, these functions are all no-ops.
Tcl_DumpActiveMemory will output a list of all currently allocated memory to the specified file. The information output for each allocated
block of memory is: starting and ending addresses (excluding guard zone), size, source file where ckalloc was called to allocate the block
and line number in that file. It is especially useful to call Tcl_DumpActiveMemory after the Tcl interpreter has been deleted.
Tcl_InitMemory adds the Tcl memory command to the interpreter given by interp. Tcl_InitMemory is called by Tcl_Main.
Tcl_ValidateAllMemory forces a validation of the guard zones of all currently allocated blocks of memory. Normally validation of a block
occurs when its freed, unless full validation is enabled, in which case validation of all blocks occurs when ckalloc and ckfree are called.
This function forces the validation to occur at any point.
SEE ALSO
TCL_MEM_DEBUG, memory
KEYWORDS
memory, debug
Tcl 8.1 Tcl_DumpActiveMemory(3)