zsh-users
 help / color / mirror / code / Atom feed
From: TjL <luomat@gmail.com>
To: "Paul Johnson" <paul@pjcj.net>
Cc: "Zsh Users List" <zsh-users@sunsite.dk>
Subject: Re: Scripting situation I cannot wrap my head around
Date: Wed, 6 Dec 2006 14:34:28 -0500	[thread overview]
Message-ID: <d2ecb10b0612061134x656bd8f5k317873447f72ed2b@mail.gmail.com> (raw)
In-Reply-To: <20061205234347.GG2596@pjcj.net>

On 12/5/06, Paul Johnson <paul@pjcj.net> wrote:
> On Tue, Dec 05, 2006 at 10:40:41AM -0500, Jean-Rene David wrote:

> > However I think a text processing tool would be
> > more appropriate than a shell for this kind of
> > task:
>
> I was thinking the same thing.

Well all you have is a shell scripting hammer :-)

I had originally thought about using 'read' statements and entering
the conversation directly into the shell, but the more I thought about
it the more it seems like a flat file was the way to go.

Unfortunately the only thing I know about perl is that I've failed to
learn how to use it whenever I tried to learn.


> > % perl -ne 'BEGIN { %person=(); } \
> >           /^([a-zA-Z]+)(:)(.*)$/ &&  \
> >             print "$1" . ++$person{$1} . "$2$3\n";' < dialog.file
>
> perl -pe 's/\w+/$& . ++$person{$&}/e' dialog.file
>
> or maybe you don't really want people to understand what you are doing:
>
> perl -pe 's((?=:))?++${$`}?e' dialog.file

Well I don't really understand either of them, but it works, so I'm
very glad for the help and since it isn't really a zsh question any
more I'll move on.


> Interesting conversation, by the way.

OT - Well the actual verbatims usually are fairly interesting.  I'm
taking a unit of CPE (Clinical Pastoral Education) at a local
hospital.  It involves a lot of knocking on the door and walking into
a room having no idea who you are going to meet and whether or not
they will be welcoming (which happens quite often), hostile (which
happens occasionally), busy/asleep (which happens frequently), or
apathetic to your existence on the planet and presence in their room
(which happes the rest of the time).

Unfortunately the details are covered under HIPPA or HIIPA or however
it's spelled.

Thanks for the help ZshFolk!

TjL


      reply	other threads:[~2006-12-06 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05  7:31 TjL
     [not found] ` <237967ef0612050017y1816e7fs66a3bdac8337fac3@mail.gmail.com>
2006-12-05  8:18   ` Mikael Magnusson
2006-12-05 14:35     ` Torur Andreassen
2006-12-05 15:40 ` Jean-Rene David
2006-12-05 23:43   ` Paul Johnson
2006-12-06 19:34     ` TjL [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=d2ecb10b0612061134x656bd8f5k317873447f72ed2b@mail.gmail.com \
    --to=luomat@gmail.com \
    --cc=paul@pjcj.net \
    --cc=zsh-users@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).