Xref: utzoo alt.sources:2066 comp.lang.perl:1767 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!samsung!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!tumuc!lan!rommel From: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) Newsgroups: alt.sources,comp.lang.perl Subject: Re: uumerge.pl Message-ID: <3317@tuminfo1.lan.informatik.tu-muenchen.dbp.de> Date: 9 Jul 90 12:20:52 GMT References: <1990Jul7.182135.19069@alembic.acs.com> Sender: news@lan.informatik.tu-muenchen.dbp.de Reply-To: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) Followup-To: alt.sources Organization: Inst. fuer Informatik, TU Muenchen, W. Germany Lines: 38 And this is my version for awk. It does not require all parts to be in separate files, the parts may be concatenated to one single file. Kai Uwe Rommel Munich rommel@lan.informatik.tu-muenchen.dbp.de ------------------------ #!/bin/awk -f BEGIN { body = 0; } /^[ ]*$/ || /[a-z]/ { body = 0; } /^begin/ { body = 1; } /^M/ && !/[a-z]/ && length($0)>60 { body = 1; } /^end/ { print $0 | "uudecode -"; body = 0; } { if ( body ) print $0 | "uudecode -"; } -----------------