assuming this: 01E000036841 is an employee id and the files are named <something>.dat
This also assumes the last eight characters of BATCH TRAILER are all the same.
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
Hi All,
In my file i need to remove header and trailer records which comes in 1st line and last line respectively. After that i need to replace '$\|' with '$#@'.
I am using sed command for this and its taking lot of time. Is there any other command which can be used to improve performance?
... (1 Reply)
How can we a shell script and pass date parameters .I have 3 files comming from Datastage with |" delimited
I need append 3 files as above: File1:
P0000|"47416954|"AU|"000|"INS|"0000|"|"20060601|"99991231|"|"|"|"|"01
File 2:... (2 Replies)
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)
:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux.
I am working in Linux terminal.
I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Hi All,
I am trying to merge all the text files into one file using below snippet
cat /home/Temp/Test/Log/*.txt >> all.txt
But it seems it is not working.
I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt
I want to merge each file into one single file and... (6 Replies)
Hello expert friends,
I'm writing a script to capture stats using sar and stuck up at report generation.
I have around 10 files in a directory and need to merge them all vertically based on the time value of first column (output file should have only one time value) and insert comma after... (6 Replies)
Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions. (2 Replies)
Hi Experts
Need help...
I am looking for a Unix script to append pipe | at the end of all the rows (except header and trailer)in all the files placed under the directory /interfaces/Temp
e.g.
Header
row1
row2
row3
Trailer
The script should read all the files under... (3 Replies)
Discussion started by: phani333
3 Replies
LEARN ABOUT DEBIAN
normalize::text::music_fields
Normalize::Text::Music_Fields(3pm) User Contributed Perl Documentation Normalize::Text::Music_Fields(3pm)NAME
Normalize::Text::Music_Fields - normalize names of people's and (musical) works.
SYNOPSIS
$name = $obj->Normalize::Text::Music_Fields::normalize_person($name);
$work = $obj->Normalize::Text::Music_Fields::normalize_piece($work);
# $obj should have methods `name_for_field_normalization', 'shorted_person'
DESCRIPTION
Databases of names and of works-per-name are taken from plain-text files (optionally in mail-header format). Names are stored in *.lst
files. Works are stored in .comp files named after the shortened name of the composer.
The directories of these files are looked in the environment variable "MUSIC_FIELDS_PATH" (if defined, split the same way as "PATH"), or in
"$ENV{HOME}/.music_fields", and "-" (and "-" is replaced by the directory named as the module file with .pm dropped). At runtime, one can
replace the list by calling function Normalize::Text::Music_Fields::set_path() with the list of directories as the argument.
(Since parsed files are cached, replacing the directory list should be done as early as possible.)
Files may be managed with utility subroutines provided with the module:
# Translate from one-per-line to mail-header format:
perl -wple "BEGIN {print q(# format = mail-header)} s/#s*normalizeds*$//; $_ = qq(Title: $_) unless /^s*(#|$)/; $_ = qq(
$_) if $p and not /^##/; $_ .= qq(
) unless $p = /^##/" Normalize::Text::Music_Fields-G_Gershwin.comp >Music_Fields-G_Gershwin.comp-mail
# (inverse transformation:) Dump pieces listed in mail-header format
perl -MNormalize::Text::Music_Fields -wle "print for Normalize::Text::Music_Fields::read_composer_file(shift, shift)" gershwin Music_Fields-G_Gershwin.comp-mail > o
# Normalize data in 1-line-per piece format
perl -MNormalize::Text::Music_Fields -wle "Normalize::Text::Music_Fields::prepare_tag_object_comp(shift)->Normalize::Text::Music_Fields::normalize_file_lines(shift)"
# Create a mail-header file from a semi-processed (with "bold" fields)
# mail-header file (with xml escapes, preceded by opus number)
perl -MNormalize::Text::Music_Fields -00wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print q(# format = mail-header)} print Normalize::Text::Music_Fields::emit_as_mail_header($tag,$_, q(bold,xml,opus),$pre)" shostakovich o-xslt-better >Music_Fields-D_Shostakovich.comp-mail1
# Likewise, from work-per-line with opus-numbers:
perl -MNormalize::Text::Music_Fields -wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print qq(# format = mail-header
)} print Normalize::Text::Music_Fields::emit_as_mail_header($tag,$_, q(opus), $pre)" schnittke o-schnittke-better >Music_Fields-A_Schnittke.comp-mail2
# A primitive tool for merging additional info into the database:
perl -MNormalize::Text::Music_Fields -wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print qq(# format = mail-header
)} next unless s/^s*++s*//; print Normalize::Text::Music_Fields::merge_info($tag,$_, q(opus,xml), qr(^(58|70|76|116|118|119)($|-)))" brahms o-brahms-op-no1-xslt
# Minimal consistency check of persons database.
perl -MNormalize::Text::Music_Fields -wle "BEGIN{binmode $_, ':encoding(cp866)' for *STDIN, *STDOUT, *STDERR} print Normalize::Text::Music_Fields->check_persons"
# Minimal testing code:
perl -MNormalize::Text::Music_Fields -e Normalize::Text::Music_Fields::test_normalize_piece
It may be easier to type these examples if one uses "manage_M_N_F.pm", which exports the mentioned subroutines to the main namespace
(available in examples directory of a distribution of "MP3::Tag"). E.g., the last example becomes:
perl -Mmanage_M_N_F -e test_normalize_piece
perl v5.14.2 2009-05-08 Normalize::Text::Music_Fields(3pm)