Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks. (4 Replies)
hi
Is there any way to automatically insert a predefined header into a file?
It would include the file name, author name, date and a description, the description entered on the first line of vi.
Thanks for any help
Oliver (4 Replies)
All,
I have a task to search through several hundred files and extract duplicate detail records and keep them grouped with their header record. If no duplicate detail record exists, don't pull the header. For example, an input file could look like this:
input.txt
HA
D1
D2
D2
D3
D4
D4... (17 Replies)
I am using HP UX and think this may be done with awk but bot sure.
I have a file with a several header records and undeneath many detail records I need to put in the header record the number of detail records above this header record and number of detail records below this header record
Header... (5 Replies)
Hello,
after 9 months of archiving 1000 files,
now, i need to change the order of fields in the header record.
some very large, space padded files.
HEADERCAS05212008D0210DOMEST01(spacepadded to record length 210)
must now be
05212008HEADERCASD0210DOMEST01(spacepadded to record length 210)
... (1 Reply)
Guys....
Got a scenario in which I need to skip parsing the header record while I do an awk.
Does awk has the flexibility to accomplish this?.
If so, how do we do this?.
Thanks !!!
-Anduzzi :) (2 Replies)
All,
I currently have a requirement to fetch a Date value from a table. And then insert a Header record into a file along with that date value.
ex:
echo "HDR"" "`date +%Y%j` `date +%Y%m%d`
In the above example I used julian date and standard date using Current Date. But the requirement... (0 Replies)
I have the following scenario where I need to use a header record from a file and generate a DML based off of it...
E.g.: The header can change periodically with an additional column in between or remove a col....
Sample header : (head -1 sample.txt)... (17 Replies)
I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long.
Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Hi,
I have a backup report that unfortunately has some kind of hanging indent thing where the first line contains one column more than the others
I managed to get the output that I wanted using awk, but just wanting to know if there is short way of doing it using the same awk
Below is what... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT DEBIAN
encode::mime::header
Encode::MIME::Header(3pm) User Contributed Perl Documentation Encode::MIME::Header(3pm)NAME
Encode::MIME::Header -- MIME 'B' and 'Q' header encoding
SYNOPSIS
use Encode qw/encode decode/;
$utf8 = decode('MIME-Header', $header);
$header = encode('MIME-Header', $utf8);
ABSTRACT
This module implements RFC 2047 Mime Header Encoding. There are 3 variant encoding names; "MIME-Header", "MIME-B" and "MIME-Q". The
difference is described below
decode() encode()
----------------------------------------------
MIME-Header Both B and Q =?UTF-8?B?....?=
MIME-B B only; Q croaks =?UTF-8?B?....?=
MIME-Q Q only; B croaks =?UTF-8?Q?....?=
DESCRIPTION
When you decode(=?encoding?X?ENCODED WORD?=), ENCODED WORD is extracted and decoded for X encoding (B for Base64, Q for Quoted-Printable).
Then the decoded chunk is fed to decode(encoding). So long as encoding is supported by Encode, any source encoding is fine.
When you encode, it just encodes UTF-8 string with X encoding then quoted with =?UTF-8?X?....?= . The parts that RFC 2047 forbids to
encode are left as is and long lines are folded within 76 bytes per line.
BUGS
It would be nice to support encoding to non-UTF8, such as =?ISO-2022-JP? and =?ISO-8859-1?= but that makes the implementation too
complicated. These days major mail agents all support =?UTF-8? so I think it is just good enough.
Due to popular demand, 'MIME-Header-ISO_2022_JP' was introduced by Makamaka. Thre are still too many MUAs especially cellular phone
handsets which does not grok UTF-8.
SEE ALSO
Encode
RFC 2047, <http://www.faqs.org/rfcs/rfc2047.html> and many other locations.
perl v5.14.2 2011-08-09 Encode::MIME::Header(3pm)