Hi everyone,
I am new to Unix programming. My inquries is:-
a) How to add a Header and Trailer in the set of data
b) Include a number count of the data in the trailer
The set of data only contained the information of 'Customer's Name' and 'Account Number'. I would like to add the Header... (2 Replies)
Hi
I have a file from which i need to remove the first 4 and the last 2 lines.. i know how to do it with sed but i need to do it in a perl script.. can you please help me how to do that.
Thanks (10 Replies)
Hi
Is there any command to scan thru a file looking for 2 consecutive blank lines and if any remove one of them. Please let me know.
Regards,
Tipsy (6 Replies)
Attached is a streamed EDI ANSI X12 output where the segment terminator/delimiter is a tilde ~ character.
Is it possible to do the following pseudo-code in a unix script (using either sed, awk and/or grep)?
Open file StreamedOutput.txt
Search for ISA and delete the data up to the tilde ~ char... (7 Replies)
i have .DAT file FILE1.DAT
1200910270040625
2123456789 J123456 ABC
2123456789 K123456 ABC
2222222222 L123456 DEF
2333333333 M12345 GHI
30000004
My outfile FILE2.TXT should have like this, I need the header value as ie (1200910270040625 ) body rows remove the duplicate rows and the... (2 Replies)
Hi guys, I was wondering if someone can give me a hand in helping me append transaction header line in a file at the end of the transaction detail lines.
Basically, I have a file that looks like this:
FHEAD File1
THEAD TRANS1-blah
TDETL HI1
TDETL HI2
TDETL HI3
TTAIL TRANS1-blah
THEAD... (3 Replies)
for example, i have a file with below content:
123413
866688
816866
818818
i want the output as:
This is header
123413
866688
816866
818818
This is trailer
i am able to achieve it using a bash script. (2 Replies)
Hi ,
My UNIX system is SUN Solaris.
I am trying to do a simple thing as described below.
I have a PIPE delimited file that has header and trailer. So the file is something like below:
Test1.txt looks like something below:
field_data1|field_data2|and some more data --Header
... (5 Replies)
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
LEARN ABOUT LINUX
dpkg::changelog::entry
Dpkg::Changelog::Entry(3) libdpkg-perl Dpkg::Changelog::Entry(3)NAME
Dpkg::Changelog::Entry - represents a changelog entry
DESCRIPTION
This object represents a changelog entry. It is composed of a set of lines with specific purpose: an header line, changes lines, a trailer
line. Blank lines can be between those kind of lines.
FUNCTIONS
my $entry = Dpkg::Changelog::Entry->new()
Creates a new object. It doesn't represent a real changelog entry until one has been successfully parsed or built from scratch.
my $str = $entry->output()
"$entry"
Get a string representation of the changelog entry.
$entry->output($fh)
Print the string representation of the changelog entry to a filehandle.
$entry->get_part($part)
Return either a string (for a single line) or an array ref (for multiple lines) corresponding to the requested part. $part can be
"header, "changes", "trailer", "blank_after_header", "blank_after_changes", "blank_after_trailer".
$entry->set_part($part, $value)
Set the value of the corresponding part. $value can be a string or an array ref.
$entry->extend_part($part, $value)
Concatenate $value at the end of the part. If the part is already a multi-line value, $value is added as a new line otherwise it's
concatenated at the end of the current line.
$is_empty = $entry->is_empty()
Returns 1 if the changelog entry doesn't contain anything at all. Returns 0 as soon as it contains something in any of its non-blank
parts.
$entry->normalize()
Normalize the content. Strip whitespaces at end of lines, use a single empty line to separate each part.
my $src = $entry->get_source()
Return the name of the source package associated to the changelog entry.
my $ver = $entry->get_version()
Return the version associated to the changelog entry.
my @dists = $entry->get_distributions()
Return a list of target distributions for this version.
$fields = $entry->get_optional_fields()
Return a set of optional fields exposed by the changelog entry. It always returns a Dpkg::Control object (possibly empty though).
$urgency = $entry->get_urgency()
Return the urgency of the associated upload.
my $maint = $entry->get_maintainer()
Return the string identifying the person who signed this changelog entry.
my $time = $entry->get_timestamp()
Return the timestamp of the changelog entry.
my $str = $entry->get_dpkg_changes()
Returns a string that is suitable for usage in a "Changes" field in the output format of "dpkg-parsechangelog".
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Changelog::Entry(3)