It would help to know what the command syntax that you are running to determine whether or not the file is spam, and more importantly if it indicates that it is spam via exit code, or message or some other mechanism.
Modulo some real information like that, guessing that the command reads the file and exits bad (non-zero) if the message is considered spam, then this might do what you want:
It creates a temporary file that is one line less than the time before and invokes some magic spam command on the file. Assuming that if the command fails it means the file is spam, it will exit leaving the last tested email in foo.1.
If this isn't quite the situation, then post how you are testing for spam and someone will probably offer up a suggestion based on that.
Hi,
I need some help in removing the header (first line) and the trailer (last line) in a give file...
The data file actually comes in EBCDIC format and I converted it into ASCII..
Now I need to strip off the first line and the last line..
I think we can use sed to do something like this:... (2 Replies)
Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions,... (6 Replies)
Hi Folks,
I am new to ksh, i have informatica parameter file that i need to update everyday with shell script. i need your help updating this file with new parameters.
sample data
$$TABLE1_DATE=04-27-2011
$$TABLE2_DATE=04-23-2011
$$TABLE3_DATE=03-19-2011
.......Highligned... (4 Replies)
Hello everyone,
This is my first posting. I have read the rules of this forum. I have searched many various threads and haven't found one that applies to my situation or suggestions to fix the issue. I do appreciate the help.
I am trying to execute a basic UNIX script in a Solaris... (4 Replies)
Hi! I have been struggling with a large file that has stray end of line characters.
I am working on a Mac (Lion). I mention this only because I have been mucking around with fixing my problem using sed, and I have learned far more than I wanted to know about Unix and Mac eol characters.
I... (1 Reply)
I have a test file with the following format, It contains the username_date when the user was locked from the database.
$ cat lockedusers.txt
TEST1_21062016
TEST2_02122015
TEST3_01032016
TEST4_01042016
I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
Hi,
i have a file with multiple entries. After some tests with sed i managed to get the file output as follows:
lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1,
00,2110597,2094790,0,81,529,75649011,56435363,
lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
LEARN ABOUT POSIX
deb-triggers
deb-triggers(5) dpkg suite deb-triggers(5)NAME
deb-triggers - package triggers
SYNOPSIS
triggers
DESCRIPTION
A package declares its relationship to some trigger(s) by including a triggers file in its control archive (i.e. DEBIAN/triggers during
package creation).
This file contains directives, one per line. Leading and trailing whitespace and everything after the first # on any line will be trimmed,
and empty lines will be ignored.
The trigger control directives currently supported are:
interest trigger-name
interest-await trigger-name
interest-noawait trigger-name
Specifies that the package is interested in the named trigger. All triggers in which a package is interested must be listed using
this directive in the triggers control file. The "noawait" variant does not put the triggering packages in triggers-awaited state.
This should be used when the functionality provided by the trigger is not crucial.
activate trigger-name
activate-await trigger-name
activate-noawait trigger-name
Arranges that changes to this package's state will activate the specified trigger. The trigger will be activated at the start of the
following operations: unpack, configure, remove (including for the benefit of a conflicting package), purge and deconfigure. The
"noawait" variant does not put the triggering packages in triggers-awaited state. This should be used when the functionality
provided by the trigger is not crucial.
If this package disappears during the unpacking of another package the trigger will be activated when the disappearance is noted
towards the end of the unpack. Trigger processing, and transition from triggers-awaited to installed, does not cause activations.
In the case of unpack, triggers mentioned in both the old and new versions of the package will be activated.
Unknown directives are an error which will prevent installation of the package.
The "-noawait" variants should always be favored when possible since triggering packages are not put in triggers-awaited state and can thus
be immediately configured without requiring the processing of the trigger. If the triggering packages are dependencies of other upgraded
packages, it will avoid an early trigger processing run and make it possible to run the trigger only once as one of the last steps of the
upgrade.
The "-noawait" variants are supported since dpkg 1.16.1, and will lead to errors if used with an older dpkg.
The "-await" alias variants are supported since dpkg 1.17.21, and will lead to errors if used with an older dpkg.
SEE ALSO dpkg-trigger(1), dpkg(1), /usr/share/doc/dpkg-dev/triggers.txt.gz.
1.19.0.5 2018-04-16 deb-triggers(5)