sed script issue

From: Itterman, Mike (Mike.Itterman@xerox.com)
Date: Mon May 01 2006 - 09:23:47 EDT


Hello All,

I wanted a simple sed script to either bypass or delete everything up to
the first email address. Basicly I need to bypass or delete "FIRST LINE
SUPPORT PAGE SENT [4/27/2006 14:24]" in the first line and then remove
any returns in the file below.

FIRST LINE SUPPORT PAGE SENT [4/27/2006 14:24] xxxxxxx@xxxx.xx.xxxxx.com

 xxxxxxx@xxxx.xx.xxxxx.com

I have used the script sed 'N;s/\n / /;P;D;' at the command prompt to
replace the returns in the file with spaces with success but in the perl
script when running this script and then putting the result in a
variable causes the following error:

/usr/local/bin/sed: -e expression #1, char 4: Unterminated `s' command

The flags you gave are used only when sending mail.

Usage: /usr/bin/mailx -eiIUdFntBNHvV~ -T FILE -u USER -h hops -r address

                -s SUBJECT -f FILE users

Content-type: text/html

The perl script that I am using is below to give you a better idea.

#!/usr/bin/perl

use Env;

sub reduce;

sub shorten;

sub cleanup;

#$down=`/usr/local/bin/sed 'N;s/\n / /;P;D;' /tmp/test1 |
/usr/local/bin/uniq`;

`/usr/bin/mailx -s "EMERGENCY CANCELLED" $down </dev/null`;

exit(0);

Any ideas on how to make this work?

Michael Itterman

Information Management

XEROX Corporation

1350 Jefferson Road

801-83A /3440-3

Rochester, NY 14623

Phone: 265-7862

E-mail: Mike.Itterman@xerox.com <mailto:Mike.Itterman@xerox.com>
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:39:42 EDT