home *** CD-ROM | disk | FTP | other *** search
- 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
-
- 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 -";
- }
-
- -----------------
-