keeping interpretations for piping?

18 views
Skip to first unread message

Claire Arthur

unread,
Sep 20, 2020, 10:55:52 AM9/20/20
to starstarhug

Hi all,

I confess I'm a little rusty on my humdrum skills. However, it would be useful in many cases to have the output of a function "keep" or display the exclusive (and possibly local) interpretations.  For instance, given that many of the functions require that the data spine is a valid humdrum spine, if I run hgrep or grep to narrow my results, I may wish to then perform some calculation or function with only those results but I can't do that unless they have interpretations.  I don't see an option on hgrep for keeping these interpretations. Is there a way to do this?  If it helps, I'm doing the following:
$beat -ca somefile.krn | grep '{' > output
#now I want to find the differences along the **absb spine for only the records I extracted, essentially:
$extractx -s $ output | xdelta -s =
However, I obviously can't do that since extractx won't work without spine info.

Am I just rusty and missing something? Thoughts anyone?

Huron, David

unread,
Sep 20, 2020, 3:23:40 PM9/20/20
to starstarhug, Claire Arthur, Huron, David
 yank -o 'regexp' -r 1 filename

operates like grep while retaining interpretations in the output. Furthermore, adding the -c option will echo all comments in the output.

-David



From: stars...@googlegroups.com <stars...@googlegroups.com> on behalf of Claire Arthur <claire....@gmail.com>
Sent: Sunday, September 20, 2020 10:55 AM
To: starstarhug <stars...@googlegroups.com>
Subject: [**HUG] keeping interpretations for piping?
 
--
--
This is a message is from the **HUG newgroup.
To post to this group, send email to stars...@googlegroups.com
To unsubscribe from this group, send email to
starstarhug...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/starstarhug?hl=en
---
You received this message because you are subscribed to the Google Groups "starstarhug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starstarhug...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/starstarhug/dbd14263-d30c-4d01-9a91-e5fb4fa63351n%40googlegroups.com.

Claire Arthur

unread,
Sep 21, 2020, 1:27:44 PM9/21/20
to starstarhug
Thanks David! I forgot about yank & didn't think of it that way.
Cheers,
Claire
Reply all
Reply to author
Forward
0 new messages