From: Itterman, Mike (Mike.Itterman@xerox.com)
Date: Tue May 02 2006 - 08:33:51 EDT
I wanted to thank all who helped
I end up using a script from Shyam Hazari to remove "fierst line..." .
cat <file name> |sed <mailto:xxxxxxx@|sed> -n -e '/]/s/.*]//p'
The information I got from Bill R. Williams was very helpful which led
me to find out why I got the error I was getting.
The substation of the return "/n" and putting this in the variable was
causing the issue, any other substation worked fine.
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>
________________________________
From: Itterman, Mike
Sent: Monday, May 01, 2006 9:24 AM
To: sunmanagers@sunmanagers.org
Subject: sed script issue
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
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:45 EDT