Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 1996 12:17:29 +0200 (MET DST)
From:      lkoeller@odie.physik2.uni-rostock.de
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1481: Bug in sed in 2.1.5-RELEASE
Message-ID:  <199608091017.MAA06786@odie.physik2.uni-rostock.de>
Resent-Message-ID: <199608091020.DAA29391@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1481
>Category:       bin
>Synopsis:       Error in sed branch or label command
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug  9 03:20:02 PDT 1996
>Last-Modified:
>Originator:     Lars Koeller
>Organization:
University of Rostock, Germany
>Release:        FreeBSD 2.1.5 i386
>Environment:

   FreeBSD-2.1.5 RELEASE

>Description:

      The error first  occured after an upgrade  from 2.1.0R to 2.1.5R  the
   faces.sendmail  sed script  didn't work  anymore  and leads to  an error
   message of  "sed: 1: "b copy": undefined  label 'copy'".   The gsed-2.05
   still works with the script.  The  faces.sendmail script is an small sed
   script which inserts  a X-Face: line into the  outgoing mail. The errors
   seems to be generic.

>How-To-Repeat:

   1. Install faces.sendmail in /usr/local/bin vith mode 0555

######## faces.sendmail #######
#!/bin/sh
#
#  @(#)faces.sendmail 1.4 91/05/06
#
#  Small script to automatically add X-Face: compressed image lines to a
#  mail message header. This shell script should be run by adding a line
#  similar to:
#
#  set sendmail=/usr/local/bin/faces.sendmail
#
#  to your ~/.mailrc file. See the faces manual pages for more details, and
#  how to setup yout ~/.face file.
# 
#  Copyright 1990, 1991 John J. Mackin. All rights reserved.
#
#  Permission is given to distribute these sources, as long as the
#  copyright messages are not removed, and no monies are exchanged.
#
#  No responsibility is taken for any errors or inaccuracies inherent
#  either to the comments or the code of this program, but if
#  reported to me then an attempt will be made to fix them.
#
cat $HOME/.face - | sed -n \
	-e '1s/^/X-Face:/' \
	-e 1h \
	-e 1d \
	-e '/^[ 	]/{H;d;}' \
	-e ': copy0' \
	-e '/^$/!{p;n;}' \
	-e '/^$/!b copy0' \
	-e g \
	-e p \
	-e 'a\

' \
	-e n \
	-e ': copy' \
	-e p \
	-e n \
	-e 'b copy' | /usr/sbin/sendmail "$@"
######### End of faces.sendmail ############

   2. Insert a line 

	set sendmail=/usr/local/bin/faces.sendmail

      in the .mailrc file in your home directory.

   3. Put a .face file in your home Directory like this one 

########## .face file ############
 nLQGe[[K51[{{[C\,BiQm[7]u1<r*biUsbPfYvu!Ee"NMw+TUPr`[d`9M2Z@?K79e,e0hGO
 fWn;9\[H~N.vTWNY>m{N>_\%nLBo4t@)CoZ}hK[W7DwX&V=}Wf#Qb,j:Jpj[(12r=b~:dYmh]fDf\,
 ]_frt6e<dI[U8(?zxR|UKs(CXNU>M<fA||Pim|ljOlWpT$FEK#{iPI$ZdS}V6cx}nyDe"<hSP#6<y3
 3$gO:t{F7o,tYE=4a$ZTF+%7w=UFjMsWObjlS`z9^8$*rOb<rlN{lusO'Ys
########### End of .face file ############

   4. Send a mail with mail command to yourself

   5. The message

	sed:  1: "b copy": undefined  label  'copy'

      should appear on your screen

>Fix:
	
   Use gesd-2.05 or the sed binary out of the 2.1.0R distribution
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608091017.MAA06786>