04-17-2013
Set PAGESIZE option to higher number or set it to 0 if you want to suppress heading and page breaks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a csv file which has no header. the file has 15 fields and needs to go out with a header of 8 fields.
The header content needs to have some variables and some fixed that i have set up:
variable header fields
OUTFILE_YEAR=`date '+%y'`
DATE=`date '+%d%m%y'`
TIME=`date '+%H:%M:%S'`... (6 Replies)
Discussion started by: Pablo_beezo
6 Replies
2. Shell Programming and Scripting
Hi,
I create a csv file and the output looks like below
Arun,E001
Sathish,E003
Now i need to include the below header and the output should like below
Name,Number
Arun,E001
Sathish,E003
Please guide me.
Thanks (4 Replies)
Discussion started by: Sekar1
4 Replies
3. Shell Programming and Scripting
Hi,
I am trying to add a header record to all the .csv files in a directory.
I am using the below sed commnad
sed -i '1 i \abc,sam,xyz,tip,pep,rip' xyz.csv
but this is not adding the header and I am not getting any error,pls tell me if any thing is wrong in the code.
Thanks,
Shruthi (2 Replies)
Discussion started by: shruthidwh
2 Replies
4. Shell Programming and Scripting
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256... (1 Reply)
Discussion started by: Vavad
1 Replies
6. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
7. UNIX for Dummies Questions & Answers
I have a flat file that contains dynamic list of variables like
a=1
b=2
c=3
.
..
z=26
I need to convert the above into a csv file having the format below:
a,b,c,..,z
1,2,3,..,26
Please note, I do not want a comma separating the last variable.
I tried to refer the post... (4 Replies)
Discussion started by: vkumbhakarna
4 Replies
8. Shell Programming and Scripting
I have a .CSV file (frequency - weekly) whose header contains the year-week value in two of the columns which keeps changing every week. For an instance please see below.
Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10,Column11,Column12,Column13,201420... (4 Replies)
Discussion started by: dhruuv369
4 Replies
9. Shell Programming and Scripting
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies
10. Shell Programming and Scripting
Hi All;
I am struggling to write a script that validates file header.
Header file would be like below with TAB separated
TRX # TYPE REF # Source Piece Code Destination Piece Code
every time I need to check the txt file if the header was same as above fields if validation success... (6 Replies)
Discussion started by: heye18
6 Replies
LEARN ABOUT SUNOS
pthread_attr_getguardsize
pthread_attr_getguardsize(3C) pthread_attr_getguardsize(3C)
NAME
pthread_attr_getguardsize, pthread_attr_setguardsize - get or set thread guardsize attribute
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include <pthread.h>
int pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize);
int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize);
The guardsize attribute controls the size of the guard area for the created thread's stack. The guardsize attribute provides protection
against overflow of the stack pointer. If a thread's stack is created with guard protection, the implementation allocates extra memory at
the overflow end of the stack as a buffer against stack overflow of the stack pointer. If an application overflows into this buffer an
error results (possibly in a SIGSEGV signal being delivered to the thread).
The guardsize attribute is provided to the application for two reasons:
1. Overflow protection can potentially result in wasted system resources. An application that creates a large number of threads, and which
knows its threads will never overflow their stack, can save system resources by turning off guard areas.
2. When threads allocate large data structures on the stack, large guard areas may be needed to detect stack overflow.
The pthread_attr_getguardsize() function gets the guardsize attribute in the attr object. This attribute is returned in the guardsize
parameter.
The pthread_attr_setguardsize() function sets the guardsize attribute in the attr object. The new value of this attribute is obtained from
the guardsize parameter. If guardsize is 0, a guard area will not be provided for threads created with attr. If guardsize is greater than
0, a guard area of at least size guardsize bytes is provided for each thread created with attr.
A conforming implementation is permitted to round up the value contained in guardsize to a multiple of the configurable system variable
PAGESIZE. If an implementation rounds up the value of guardsize to a multiple of PAGESIZE, a call to pthread_attr_getguardsize() specify-
ing attr will store in the guardsize parameter the guard size specified by the previous pthread_attr_setguardsize() function call.
The default value of the guardsize attribute is PAGESIZE bytes. The actual value of PAGESIZE is implementation-dependent and may not be
the same on all implementations.
If the stackaddr attribute has been set (that is, the caller is allocating and managing its own thread stacks), the guardsize attribute is
ignored and no protection will be provided by the implementation. It is the responsibility of the application to manage stack overflow
along with stack allocation and management in this case.
If successful, the pthread_attr_getguardsize() and pthread_attr_setguardsize() functions return 0. Otherwise, an error number is returned
to indicate the error.
The pthread_attr_getguardsize() and pthread_attr_setguardsize() functions will fail if:
EINVAL The attribute attr is invalid.
EINVAL The parameter guardsize is invalid.
EINVAL The parameter guardsize contains an invalid value.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
sysconf(3C), pthread_attr_init(3C), attributes(5), standards(5)
23 mar 2005 pthread_attr_getguardsize(3C)