From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: Re: [9fans] regexp metacharacter difficulty inside grap
Date: Tue, 10 Aug 2010 09:37:18 +0100 [thread overview]
Message-ID: <0ce4afcf62f74dc513a6aa1941a39d95@quintile.net> (raw)
In-Reply-To: <09DB2D65-A18A-493E-9886-2D5D3334F460@corpus-callosum.com>
> if "$2" == "(Yo" then {
> print sprintf("Yo was %f", yo)
> yo = sh { echo $3 | sed 's/\)#//' }
> print sprintf("Yo is %f", yo)
> }
Not sure I get the twists and turns of your shell, which one are you using
as I assume the subtle details are important here - is it bash? also who's grap
is this, is it plan9's or some unix/linux?
My take on the same parsing problem is:
larch% echo '(Yo 4.9524)' | awk '{print $2+0}'
4.9524
I don't know if this helps (probably not).
-Steve
next prev parent reply other threads:[~2010-08-10 8:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 5:23 Jeff Sickel
2010-08-10 8:37 ` Steve Simon [this message]
2010-08-10 8:54 ` Rudolf Sykora
2010-08-10 9:14 ` Rudolf Sykora
2010-08-10 11:45 ` erik quanstrom
2010-08-10 13:06 ` Jeff Sickel
2010-08-10 13:10 ` Federico G. Benavento
2010-08-10 13:41 ` Rudolf Sykora
2010-08-10 13:58 ` Jeff Sickel
2010-08-10 14:11 ` erik quanstrom
2010-08-10 15:52 ` Russ Cox
2010-08-11 5:41 ` Jeff Sickel
2010-08-17 6:07 ` [9fans] iwp9 macros.ms + mkfile, (was--Re: regexp metacharacter difficulty inside grap) Jeff Sickel
2010-08-17 16:21 ` Russ Cox
2010-08-18 1:28 ` Jeff Sickel
2010-08-18 1:59 ` Russ Cox
2010-08-20 14:58 ` Jeff Sickel
2010-08-21 2:22 ` Russ Cox
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=0ce4afcf62f74dc513a6aa1941a39d95@quintile.net \
--to=steve@quintile.net \
--cc=9fans@9fans.net \
/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).