01-29-2016
solution
its not working correctly, in the middle of the file it prints the header in one of the rows, and the first line is ,0,0
my csv file has headers so i added NR==1
still no luck
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi, I have a csv file with a key composed by 3 columns and some other numeric fields and I need to obtain the partial amounts by some part of the key. This may be some difficult to understand, so better see an example, where my input file is:
name,surname,department,y2004,y2005,y2006... (6 Replies)
Discussion started by: oscarmon
6 Replies
2. Shell Programming and Scripting
Hi ,
I have .csv file with value separated by ";".
1. Using awk how to extract perticular colums and store in to array
2. For some columns I needs to extract last value of the column
How to do same please help me ASAP
Thanks and Regards,
Sushma (9 Replies)
Discussion started by: sushmab82
9 Replies
3. UNIX for Dummies Questions & Answers
I have a simple txt files that looks something like this (The title is a part of the text file)
Student Grades
---------------
1 Tim Purser 89
2 John Wayne 56
3 Jenn Hawkins 95
4 Harry Potter 75
Here are my questions:
How would I ONLY print the names of students... (2 Replies)
Discussion started by: ninjagod123
2 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys,
Can you help me in creating shell script using sed,awk etc commands to generate csv file using xml file. (5 Replies)
Discussion started by: sbk
5 Replies
5. Shell Programming and Scripting
I'm just wondering is there any way to capture the output of a unix command in a csv format.
df -h gives the result of filesystem,free space,Used space, use %,mounted on.
Is there a way to capture the command output and format it as comma sparated or fixed length file. (3 Replies)
Discussion started by: anita81
3 Replies
6. Shell Programming and Scripting
Hello,
How do i manipulate .csv file to this format?
Thank you very much.
Source:
john,5
marco,7
john,4
paul,3
marco,8
Output:
john,9
marco,15 (5 Replies)
Discussion started by: tara123
5 Replies
7. Shell Programming and Scripting
Hi,
I am new to awk/unix and am trying to put together a script to manipulate the date column in a csv file.
I have file1.csv with the following contents:
Date,ID,Number,Amount,Volume,Size
01-Apr-2014,WERFG,998,105873.96,10873.96,1342.11
01-Apr-2014,POYFR,267,5681.44,5681.44,462.96
I... (2 Replies)
Discussion started by: Prit Siv
2 Replies
8. Shell Programming and Scripting
Hi All,
I have a file like below and i have 2 questions on this (They are 3 lines starts with 01 , 02 and 03. but is
01abc333644554 234 2334535 34534535355353 sfsdf345455
353 4543 jgkg tty 7676
02cdesdfsdfsdf 234 wesdfsdf 345345 234234 234234 2342342 dfgdfg
sdfgg dgdgdg fgvfs... (6 Replies)
Discussion started by: siva.pitchai
6 Replies
9. UNIX for Beginners Questions & Answers
Hi Everyone,
I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file? Please let me know what is the awk command for this?
Regards
Rakesh (1 Reply)
Discussion started by: rakeshp
1 Replies
10. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file?... (6 Replies)
Discussion started by: rakeshp
6 Replies
LEARN ABOUT HPUX
smfi_chgheader
smfi_chgheader()(3N) smfi_chgheader()(3N)
NAME
smfi_chgheader() - changes or deletes a sendmail message header
SYNOPSIS
PARAMETERS
ctx Specifies the opaque context structure.
headerf Specifies the header name, which is a non-NULL, null-terminated string.
hdridx Specifies the header index value (1-based). A hdridx value of 1 modifies the first occurrence of a header named If hdridx is
greater than the number of times appears, a new copy of is added.
DESCRIPTION
changes the value of a header for the current message. can be called only from the routine.
Notes
o While can be used to add new headers, it is more efficient to use
o A filter that calls must set the flag in the structure passed to
o The filter order is important for Filter placed later in the sequence will observer the changes already done by earlier filters.
o The name and the value of the header are not checked for standards compliance. However, each line of the header must be under 2048
characters. If longer headers are needed, multi-line header must be used. To make a multi-line header, insert a linefeed (ASCII 0x0a,
or
in C) followed by at least one whitespace character, such as, a space (ASCII 0x20) or tab (ASCII 0x09, or in C). The linefeed
must not be preceded by a carriage return (ASCII 0x0d); the MTA adds this automatically. It is the responsibility of the filter writer
to ensure that standards are not violated.
RETURN VALUE
returns due to the following reasons:
o headerf contains a NULL value.
o Modifying headers in the current connection state is invalid.
o Memory allocation fails.
o Network error occurs.
o is not set when is called.
returns on success.
EXAMPLES
AUTHOR
was developed by the Sendmail Inc.
SEE ALSO
smfi_addheader(3N), smfi_insheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N).
on
smfi_chgheader()(3N)