[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006
From: |
Jack Cuyler |
Subject: |
[Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0 |
Date: |
Sun, 8 Oct 2006 19:13:43 +0000 (UTC) |
User-agent: |
pan 0.115 (Mrs. Kerr Says Remember the Tip Jar) |
On Sun, 08 Oct 2006 16:16:30 +0000, Jack Cuyler wrote:
> On Sun, 08 Oct 2006 16:00:17 +0000, Jack Cuyler wrote:
>
>> This patch will strip out the sig and add it back in at the end (although
>> the latter part is commented out, as I'm not sure if that will break
>> anything)
>
> And looks like I found a typo. Two, actually.
>
>> +sed -n -e '1,/-- /p' ${TEMPFILE} |\
>> +grep -v ^'-- ' > ${BODYFILE}
>
> The regex should have a ^ in there, like so:
Thinking it over a bit more, the regexes should probably have a $ in there,
too, so lines like:
-- something here
don't match. Also, there's really no need for the grep -v if the proper
sed statement is used. Me and my hasty posting. Anyhoo, here's the
revised patch.
--- pan-atach-kd.orig 2006-10-08 11:44:50.000000000 -0400
+++ pan-atach-kd 2006-10-08 15:09:16.000000000 -0400
@@ -8,6 +8,8 @@
NAME="pan-attach-kd"
VERSION="0.0.2006.10.07.0"
BODYFILE=${1:--h}
+TMP=${TMP:-/tmp}
+TEMPFILE=${TMP}/panpost.$(date +%Y%m%d%H%M%S%N)
################################################################################
# description and help
@@ -121,10 +123,20 @@
################################################################################
# OK, we know the attach file is readable, and we know what encoding to use,
so...
+# Copy the inital text to the temp file
+cat ${BODYFILE} > ${TEMPFILE}
+
+# Strip out the sig and overwrite the body
+sed '/^-- $/,//d' ${TEMPFILE} > ${BODYFILE}
+
echo >> ${BODYFILE}
echo >> ${BODYFILE}
uuenview -${ENCODE} ${ATFILE} >> ${BODYFILE}
+# Uncomment the next 2 lines to add the sig back in
+#echo >> ${BODYFILE}
+#sed -n -e '/^-- $/,//p' ${TEMPFILE} >> ${BODYFILE}
+rm ${TEMPFILE}
################################################################################
# debugging aids
#konsole --noclose --nohist -e echo $
--
Cheers,
Jack
SPITWADS ARE NOT FREE SPEECH
SPITWADS ARE NOT FREE SPEECH
SPITWADS ARE NOT FREE SPEECH
SPITWADS ARE NOT FREE SPEECH
Bart Simpson on chalkboard in episode 8F01
- Re: [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, (continued)
- Re: [Pan-users] ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Dave, 2006/10/07
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Jack Cuyler, 2006/10/08
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Jack Cuyler, 2006/10/08
- Re: [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Dave, 2006/10/08
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0,
Jack Cuyler <=
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Duncan, 2006/10/09
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Jack Cuyler, 2006/10/10
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Duncan, 2006/10/11
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Duncan, 2006/10/23
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Jack Cuyler, 2006/10/23
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Jack Cuyler, 2006/10/23
- Re: [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Rhialto, 2006/10/23
- [Pan-users] Re: ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Duncan, 2006/10/24
Re: [Pan-users] ANNOUNCE: pan-attach and pan-attach-kd, version 0.0.2006.10.07.0, Dave, 2006/10/09