From: Victor Nazarov <vir@comtv.ru>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] awk script weirdness
Date: Wed, 22 Nov 2006 00:19:52 +0300 [thread overview]
Message-ID: <45636D78.5090501@comtv.ru> (raw)
In-Reply-To: <c8ce9dd8c960869e44a9a78249271cae@comcast.net>
Gregory Pavelcak wrote:
>I've been trying to break a large .ms-like file into smaller
>files with awk with variations on the following script
>
>awk '
> BEGIN {i=0}
> /^\.([lp]p|hd|xm\/)/ {print >> ++i; next}
> {print >> i}
>' ../indis.ms
>
>Whatever I do, it will work fine creating the first 85 files
>then quit.
>
>
[snip]
>
>Any ideas?
>
>
awk '
BEGIN {i=0}
/^\.([lp]p|hd|xm\/)/ {close i; i++; print >> i; next}
{print >> i}
' ../indis.ms
prev parent reply other threads:[~2006-11-21 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 18:58 Gregory Pavelcak
2006-11-21 19:06 ` Sape Mullender
2006-11-21 19:13 ` Gregory Pavelcak
2006-11-21 21:19 ` Victor Nazarov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45636D78.5090501@comtv.ru \
--to=vir@comtv.ru \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).