Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site heurikon.UUCP Path: utzoo!linus!security!genrad!decvax!harpo!seismo!uwvax!heurikon!jeff From: jeff@heurikon.UUCP Newsgroups: net.unix Subject: Re: Mail Filters Needed Message-ID: <162@heurikon.UUCP> Date: Fri, 6-Jan-84 03:05:46 EST Article-I.D.: heurikon.162 Posted: Fri Jan 6 03:05:46 1984 Date-Received: Sat, 7-Jan-84 02:43:31 EST References: <15091@sri-arpa.UUCP> Organization: Heurikon Corp., Madison WI Lines: 25 I've used 'sed' numerous times to make a filter of the type you described ("Modify the Date field of a msg..."). For example, the following filter will force a particular machine name to occupy the first position in a 'path' header: sed -e "s/^Path: foo!/Path: /" -e "s/^Path: /&foo!/" In this case, if 'foo' is already at the beginning of the path it removes it, then it adds 'foo' - thus assuring there is always one 'foo' (and only one) at the front of the path. You could use 'sed' to adjust the date field in a similar fashion. You may need a number of -e fields to cope with the various days of the week (or one 'sfile'), but sed is very flexible - and it's fast. Try it, you'll like. Another idea: If all you need to do is *remove* a particular field from a line, then you could feed the line in question to 'cut' and have it deliver only the fields of the line you want. -- Jeffrey Mattox, Heurikon Corp, Madison, WI {harpo, hao, philabs}!seismo!uwvax!heurikon!jeff (news & mail) ihnp4!uwvax!heurikon!jeff (mail) (Those paths are correct, despite what the headers might show.)