This is what I have got so far.
But I keep getting the error "Field is not correct"
I think the error is due to the ID AND EMAIL column not found (by searching for the column name) in abc.txt, hence f[n] evaluates to blank. When the code tries to do printf with $<blank>, it gives this error.
I am almost there, just need a tip how i can handle printf $<blank> so that it prints a blank column rather than errored out.
As i said, i am very new to unix scripting
---------- Post updated 10-05-10 at 08:03 AM ---------- Previous update was 10-04-10 at 06:24 PM ----------
Hi experts,
Anyone can help me with this please?
Potentially this implementation can help save any manual work that i am doing. That means less Overtime for me and more time with my family.
Has anyone seen this before?
if i ls a particular directory (an email Maildir) i get a long list of files, if i 'du -h' that same directory, i get messages like:
du: `./1053894791.17207_0.srweb,S=6199': No such file or directory
strange. so using tab will complete this filename too, giving... (3 Replies)
Hi,
Could some one help me to get rid of visually blank lines from a file using shell or awk or sed (on Solaris machine)?
When I use grep grep -v ^$ inputfile >outputfile it removes some blank lines.. but it seems some tab plus space balnk lines remains.
thaen I used "grep -v '^]*$' ... (1 Reply)
Dear users,
I googled for a while, but i have got a lot of different answers regarding a simple unix command.
lets say there are a lot of files in a directory.
How can i list the files in a directory whose file types is "text"?
Thank you in advance (4 Replies)
I have a setup where I have two drives.
TV
TVbackup
For what ever reason, I have a lot of content on my TVbackup drive which isn't on my TV drive.
I want to copy all the files across which are on TVbackup but are not currently on TV.
If there is a file with the same name but a... (2 Replies)
Dear all,
I am trying to sort a text file based on column 3, 10, 11 and 12. But certain column are blank for some lines. Column 3 has to be in ascending order after sorting.
Part of my input file is as follows:
CN727990 1 A01 4703 5083 73.28 - A_scaffold000011 4365605 4365985 73.28 +... (10 Replies)
Hi,
i have a csv file which have headers and values of it like below :
headers --> CI Ref SerialNumber LastScanDate
values --> VMware-42,VMware-42,Tue, 20 May 2014 11:03:44 +0000
i want to have a above csv in below format :
headers --> CI Name CI Description CI Ref... (6 Replies)
Hello,
I have some tab delimited files that may contain blank columns. I would like to delete the blank columns if they exist. There is no clear pattern for when a blank occurs.
I was thinking of using sed to replace instances of double tab with blank,
sed 's/\t\t//g'
All of the examples... (2 Replies)
I have a file with the following format:
X|High|2|GIC|DM||XHM|||6 Months
X|Moderate|2|GIC|DM||XHM|||6 Months
X|High|2|GCM|DM||XSF|||6 Months
X|Med|2|GCM|DM||XSF|||6
Here there are ten columns but I need to print rows having blank records in any of the rows (except for 6th,8th and 9th... (10 Replies)
Hi, I would like to seek your help for a script that will extract data from log file and put it in a file.
Sample log file
2018-10-23 12:33:21 AI ERROR -- tpid: SAMPLE_TH account: 123456789 aiSessionNumber: 660640464 mapName: xxx to yyy
errorDesc: Translation Error:ErrorNumber : 993 ... (2 Replies)
Discussion started by: neverwinter112
2 Replies
LEARN ABOUT DEBIAN
courier::filter::module::header
Courier::Filter::Module::Header(3pm) User Contributed Perl Documentation Courier::Filter::Module::Header(3pm)NAME
Courier::Filter::Module::Header - Message header filter module for the Courier::Filter framework
SYNOPSIS
use Courier::Filter::Module::Header;
my $module = Courier::Filter::Module::Header->new(
fields => \%patterns_by_field_name,
response => $response_text,
logger => $logger,
inverse => 0,
trusting => 0,
testing => 0,
debugging => 0
);
my $filter = Courier::Filter->new(
...
modules => [ $module ],
...
);
DESCRIPTION
This class is a filter module class for use with Courier::Filter. It matches a message if one of the message's header fields matches the
configured criteria.
Constructor
The following constructor is provided:
new(%options): returns Courier::Filter::Module::Header
Creates a new Header filter module.
%options is a list of key/value pairs representing any of the following options:
fields
Required. A reference to a hash containing the message header field names and patterns (as key/value pairs) that messages are to
be matched against. Field names are matched case-insensitively. Patterns may either be simple strings (for exact, case-sensitive
matches) or regular expression objects created by the "qr//" operator (for inexact, partial matches).
So for instance, to match any message from the "debian-devel" mailing list with the subject containing something about 'duelling
banjoes', you could set the "fields" option as follows:
fields => {
'list-id' => '<debian-devel.lists.debian.org>',
subject => qr/duell?ings+banjoe?s?/i
}
response
A string that is to be returned literally as the match result in case of a match. Defaults to "Prohibited header value detected:
<field>: <value>".
All options of the Courier::Filter::Module constructor are also supported. Please see "new()" in Courier::Filter::Module for their
descriptions.
Instance methods
See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods.
SEE ALSO
Courier::Filter::Module::Envelope, Courier::Filter::Module, Courier::Filter::Overview.
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview.
AUTHOR
Julian Mehnle <julian@mehnle.net>
perl v5.14.2 2011-12-27 Courier::Filter::Module::Header(3pm)