Sponsored Content
Full Discussion: Insert Header Name
Top Forums Shell Programming and Scripting Insert Header Name Post 302324755 by vidyadhar85 on Thursday 11th of June 2009 04:08:38 PM
Old 06-11-2009
change the alias names of the column to whatever name you want and run the query
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

insert header row into .xls

Hello, I am building an .xls file extracting info from a DB to be eventually emailed. All is good except how do I put in a header row.. like date, name of report etc. before the columns with the actual column name and data? Thanks for any assistance.. the below is after I have signed into... (11 Replies)
Discussion started by: Tish
11 Replies

2. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

3. Shell Programming and Scripting

insert a header in a huge data file without using an intermediate file

I have a file with data extracted, and need to insert a header with a constant string, say: H|PayerDataExtract if i use sed, i have to redirect the output to a seperate file like sed ' sed commands' ExtractDataFile.dat > ExtractDataFileWithHeader.dat the same is true for awk and... (10 Replies)
Discussion started by: deepaktanna
10 Replies

4. Shell Programming and Scripting

Renaming all header to specific header pattern

Input #HAC0253 EFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV #BASFS12 EFVEFVHIJEFVEFVTOPKEFVOPKTHIJTTHIJOPK #ACG5115 TEFVEFVOIJEFVHIJHIJOPKOPKHIJHIJTTEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK #ECG5114 IJTOPKHIJEFVOEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK . . Output (5 Replies)
Discussion started by: patrick87
5 Replies

5. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

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

6. 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

7. Shell Programming and Scripting

Insert date/time header at top of file

I'm trying to take mrt output and put it at the top of a file along with the date and time. I was able to do it at the bottom of the file with the following printf "********** $(date) **********\n\n" >> $OUTPUT_PATH/$HOSTNAME mtr -r -w -c 10 $HOSTADDRESS >> $OUTPUT_PATH/$HOSTNAME printf... (2 Replies)
Discussion started by: kramer65
2 Replies

8. Shell Programming and Scripting

How to insert header with underline?

How to insert header with underline AM able to insert only header not underline sed '1i NAME COUNTRY' test.txt input file UK 1234 USA 2354 AUS 2253 IND 4256 Output file NAME COUNTRY_CODE ---- ------------ UK 1234 USA 2354 AUS 2253 IND 4256 (5 Replies)
Discussion started by: Kalia
5 Replies

9. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
TM::Serializable::CSV(3pm)				User Contributed Perl Documentation				TM::Serializable::CSV(3pm)

NAME
TM::Serializable::CSV - Topic Maps, trait for parsing (and later dumping) CSV stream SYNOPSIS
# 1) bare bones my $tm = .....; # get a map from somewhere (can be empty) Class::Trait->apply ($tm, "TM::Serializable::CSV"); use Perl6::Slurp; $tm->deserialize (slurp 'myugly.csv'); # 2) exploiting the timed sync in/out mechanism my $tm = new TM::.... (url => 'file:myugly.csv'); # get a RESOURCEABLE map from somewhere $tm->sync_in; DESCRIPTION
This trait provides parsing and dumping from CSV formatted text streams. INTERFACE
Methods deserialize $tm->deserialize ($text) This method consumes the text string passed in and interprets it as CSV formatted information. What topic map information is generated, depends on the header line (the first line): o If the header line contains a field called "association-type", then all rows will be interpreted as assertions. In that the remaining header fields (in that order) are interpreted as roles (role types). For all rows in the CSV stream, the position where the "association-type" field was is ignored. The other fields (in that order) are affiliated with the corresponding roles. Example: association-type,location,bio-unit is-born,gold-coast,rumsti is-born,vienna,ramsti Scoping cannot be controlled. Also all players and roles (obviously) are directly interpreted as identifiers. Subject identifiers and locators are not (yet) implemented. o If the header line contains a field called "id", then all further rows will be interpreted as topic characteristics, with each topic on one line. The column position where the "id" field in the header is will be interpreted as toplet identifier. All further columns will be interpreted according to the following: o If the header column is named "name", the values will be used as topic names. o Otherwise if the value looks like a URI, an occurrence with that URI value will be be added to the topic. o Otherwise an occurrence with a string value will be added to the topic. Example: name,id,location,homepage "Rumsti",rumsti,gold-coast,http://rumsti.com "Ramsti",ramsti,vienna,http://ramsti.com serialize $tm->serialize [Since TM 1.53] This method serializes a fragment of a topic map into CSV. Which fragment can be controlled with the header line and options (see constructor). "header_line" (only for serialization) This string contains a comma separated list (CSV parseable) of headings. If one of the headings is "association-type", then the generated CSV content will contain associations only. Nothing else is implemented yet. The other headings control which roles (and in which order) should be included in the CSV content. If a particular role type has more than one player, then all players are included. NOTE: As this is inconsistent, this will have to change. "type" (only for serialization) If existing, then this controls which association type is to be taken. "baseuri" (only for serialization) If existing and non-zero, the base URI of the map will remain in the identifiers. Otherwise it will be removed. "specification" If existing (and when selecting only associations), this specification will be interpreted in the sense of "asserts" (see TM). Example: $tm->serialize (header_line => 'association-type,location,bio-unit', type => 'is-born', baseuri => 0); SEE ALSO
TM, TM::Serializable AUTHOR INFORMATION
Copyright 2010 Robert Barta. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2012-06-05 TM::Serializable::CSV(3pm)
All times are GMT -4. The time now is 10:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy