Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Delete header row and reformat from tab delimited to fixed width Post 302536650 by chumsky on Wednesday 6th of July 2011 03:22:27 AM
Old 07-06-2011
yes, something like this, but columns 7, 8 & 9 are misaligned
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting a Delimited File to Fixed width file

Hi, I have a delimited file generated by a database and i need to convert it to fixed width file using the field length of the database. Can any body suggest me how can i proceed with it? :confused: Thanks Raghavan (2 Replies)
Discussion started by: raghavan.aero
2 Replies

2. Shell Programming and Scripting

row to column and position data in to fixed column width

Dear friends, Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number. Program COUNT=1 for MYDIR in `ls /` do VOBS=${MYDIR} echo "${COUNT}. ${MYDIR}" ... (4 Replies)
Discussion started by: baluchen
4 Replies

3. UNIX for Dummies Questions & Answers

convert # delimited text file to fixed width

Hello gurus, I have a file containing 5 columns delimited by '#' as shown in the example below: HRP1000-PLVAR#HRP1000-OTYPE#HRP1000-OBJID#HRP1000-BEGDA#HRP1000-ENDDA# 99991231#AU7129#000000000#1 PROCTER & GAMBLE# 99991231#TT4283#1000013883#21111 LAUNDRY# 99991231#TT4283#1000013884#21121 DISH... (3 Replies)
Discussion started by: chumsky
3 Replies

4. Shell Programming and Scripting

Ignore Header and Footer and Sort the data in fixed width file

Hi Experts, I want to Sort the data in fixed width file where i have Header and Footer also in file. I m using below commad to do the sort based on field satarting from 15 position to 17 position , but it is not ignoring the Header and Footer of the file while sorting. In the output i am... (5 Replies)
Discussion started by: sasikari
5 Replies

5. Shell Programming and Scripting

Parse tab delimited file, check condition and delete row

I am fairly new to programming and trying to resolve this problem. I have the file like this. CHROM POS REF ALT 10_sample.bam 11_sample.bam 12_sample.bam 13_sample.bam 14_sample.bam 15_sample.bam 16_sample.bam tg93 77 T C T T T T T tg93 79 ... (4 Replies)
Discussion started by: empyrean
4 Replies

6. Shell Programming and Scripting

[Solved] Append an header to a tab delimited file

Dear All, I would like to find an automatic way to add a given code which belong to a class at the end of the column , for example this is my input file: 0610009O20Rik V$VMYB_01 310 (+) 1 0.971 v-Myb V$EVI1_04 782 (-) 0.763 0.834 Evi-1 V$ELK1_02 1966 (-) 1 0.984 Elk-1... (4 Replies)
Discussion started by: paolo.kunder
4 Replies

7. UNIX for Dummies Questions & Answers

How to add a header to a tab delimited .txt file?

Hi, I have a tab delimited document with 18 columns. My file looks like: comp1000201_c0_seq1 comp1000201_c0 337 183.51 0.00 0.00 0.00 0.00 ---NA--- 337 0 0 - comp1000297_c0_seq1 comp1000297_c0 612 458.50 ... (1 Reply)
Discussion started by: alisrpp
1 Replies

8. Shell Programming and Scripting

Insert a header record (tab delimited) in multiple files

Hi Forum. I'm struggling to find a solution for the following issue. I have multiple files a1.txt, a2.txt, a3.txt, etc. and I would like to insert a tab-delimited header record at the beginning of each of the files. This is my code so far but it's not working as expected. for i in... (2 Replies)
Discussion started by: pchang
2 Replies

9. UNIX for Beginners Questions & Answers

awk to parse current and next row in tab-delimited file

Hi there, I would like to use awk to reformat a tab-delimited file containing three columns as follows: Data file: sample 1 173 sample 269 530 sample 687 733 sample 1699 1779 Desired output file: sample 174..265, 531..686, 734..1698 I need the value... (5 Replies)
Discussion started by: emiley
5 Replies

10. UNIX for Beginners Questions & Answers

Convert a fixed width file to a delimited file

Hi - this is a generic question .... is there any utility which can convert a fixed width file format to a delimited file (any given character delimited) ? (5 Replies)
Discussion started by: i4ismail
5 Replies
mtmalloc(3MALLOC)					Memory Allocation Library Functions					 mtmalloc(3MALLOC)

NAME
mtmalloc, mallocctl - MT hot memory allocator SYNOPSIS
#include <mtmalloc.h> cc -o a.out -lthread -lmtmalloc void *malloc(size_t size); void free(void *ptr); void *memalign(size_t alignment, size_t size); void *realloc(void *ptr, size_t size); void *valloc(size_t size); void mallocctl(int cmd, long value); DESCRIPTION
The malloc() and free() functions provide a simple general-purpose memory allocation package that is suitable for use in high performance multithreaded applications. The suggested use of this library is in multithreaded applications; it can be used for single threaded appli- cations, but there is no advantage in doing so. This library cannot be dynamically loaded with dlopen(3C) during runtime because there must be only one manager of the process heap. The malloc() function returns a pointer to a block of at least size bytes suitably aligned for any use. The argument to free() is a pointer to a block previously allocated by malloc() or realloc(). After free() is performed this space is available for further allocation. If ptr is a null pointer, no action occurs. The free() function does not set errno. Undefined results will occur if the space assigned by malloc() is overrun or if a random number is handed to free(). A freed pointer that is passed to free() will send a SIGABRT signal to the calling process. This behavior is controlled by mallocctl(). The memalign() function allocates size bytes on a specified alignment boundary and returns a pointer to the allocated block. The value of the returned address is guaranteed to be an even multiple of alignment. Note that the value of alignment must be a power of two, and must be greater than or equal to the size of a word. The realloc() function changes the size of the block pointed to by ptr to size bytes and returns a pointer to the (possibly moved) block. The contents will be unchanged up to the lesser of the new and old sizes. If the new size of the block requires movement of the block, the space for the previous instantiation of the block is freed. If the new size is larger, the contents of the newly allocated portion of the block are unspecified. If ptr is NULL, realloc() behaves like malloc() for the specified size. If size is 0 and ptr is not a null pointer, the space pointed to is freed. The valloc() function has the same effect as malloc(), except that the allocated memory will be aligned to a multiple of the value returned by sysconf(_SC_PAGESIZE). After possible pointer coercion, each allocation routine returns a pointer to a space that is suitably aligned for storage of any type of object. The malloc(), realloc(), memalign(), and valloc() functions will fail if there is not enough available memory. The mallocctl() function controls the behavior of the malloc library. The options fall into two general classes, debugging options and per- formance options. MTDOUBLEFREE Allows double free of a pointer. Setting value to 1 means yes and 0 means no. The default behavior of double free results in a core dump. MTDEBUGPATTERN Writes misaligned data into the buffer after free(). When the buffer is reallocated, the contents are verified to ensure that there was no access to the buffer after the free. If the buffer has been dirtied, a SIGABRT signal is delivered to the process. Setting value to 1 means yes and 0 means no. The default behavior is to not write misaligned data. The pattern used is 0xdeadbeef. Use of this option results in a performance penalty. MTINITBUFFER Writes misaligned data into the newly allocated buffer. This option is useful for detecting some accesses before initial- ization. Setting value to 1 means yes and 0 means no. The default behavior is to not write misaligned data to the newly allocated buffer. The pattern used is 0xbaddcafe. Use of this option results in a performance penalty. MTCHUNKSIZE This option changes the size of allocated memory when a pool has exhausted all available memory in the buffer. Increasing this value allocates more memory for the application. A substantial performance gain can occur because the library makes fewer calls to the OS for more memory. Acceptable number values are between 9 and 256. The default value is 9. This value is multiplied by 8192. RETURN VALUES
If there is no available memory, malloc(), realloc(), memalign(), and valloc() return a null pointer. When realloc() is called with size > 0 and returns NULL, the block pointed to by ptr is left intact. If size, nelem, or elsize is 0, either a null pointer or a unique pointer that can be passed to free() is returned. If malloc() or realloc() returns unsuccessfully, errno will be set to indicate the error. ERRORS
The malloc() and realloc() functions will fail if: ENOMEM The physical limits of the system are exceeded by size bytes of memory which cannot be allocated. EAGAIN There is not enough memory available to allocate size bytes of memory; but the application could try again later. USAGE
Comparative features of the various allocation libraries can be found in the umem_alloc(3MALLOC) manual page. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
brk(2), getrlimit(2), bsdmalloc(3MALLOC), dlopen(3C), malloc(3C), malloc(3MALLOC), mapmalloc(3MALLOC), signal.h(3HEAD), umem_alloc(3MAL- LOC), watchmalloc(3MALLOC), attributes(5) WARNINGS
Undefined results will occur if the size requested for a block of memory exceeds the maximum size of a process's heap. This information may be obtained using getrlimit(). SunOS 5.11 21 Mar 2005 mtmalloc(3MALLOC)
All times are GMT -4. The time now is 06:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy