9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cLIeNUX user <r@your_host.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] scripting sam
Date: Tue,  2 Jan 2001 17:35:42 +0000	[thread overview]
Message-ID: <t4aapatmrv54e@corp.supernews.com> (raw)
In-Reply-To: <20001223193414.7EA87199DD@mail.cse.psu.edu>

anothy@cosym.net... 
>//plan 9 has been around for nearly 10 years.  all this
>//'why can't i have my favourite toy on it?' mail is a
>//bit much.
>
>and i've been at least a casual user for almost half of
>that. how is asking about sam "why can't i have my favorite
>toy"? i was asking how to better use the tools Plan 9
>provides. yeah, you can write telnet with echo and cat; how
>exactly is that relavant to the issue at hand again? i'm
>well aware of the power of the system... which is exactly
>why i was asking how to use it, and the tools it provides,
>better, rather than sticking with sed (which can do what i
>want, but i'd need to use the hold spaces, which are ugly).
>
>much thanks to everyone who responded helpfully.
>-.




h is for help. In cLIeNUX sam. Easy hack, BTW.


____________________________________________________________________________
cLIeNUX sam/tp text processing language cheatsheet
cheatsheet markup...
  refNAME  `default'  "virtual"  /delimited/  0_or_more...  <variable>

syntax operators                (in commands, not patterns or strings)
  delimiter                     any punctuation, paired or with EOL
  next character is literal     \

text location operators         (address elements)
  linefeed (unix newline)       \n
  "empty line" at End Of File   $
  current text segment          .
  MARKed text segment           '
  scanning DIRection            - or `+'
  Line Number                   <digits>
  Character Number              #<digits>
  match scan PATtern            /regular expression, \n allowed/
  OFFset                        <DIR>LN or CN or PAT or `1'
  HALF address                  <LN or CN or PAT or MARK or `.'><OFF...>
  full ADDRess                  <HALF>,<HALF>    just  ,  is whole buffer

text inputs
  INTERactive                   accept typed text up to . alone on line
  Whole Match Backreference     &
  SUBmatch backreference        \<digit>    nth match ()-delimited in PAT
  LITeral string                /literal text and|or WMB... and|or SUB.../
  INPUT                         LIT or INTER

commands and thier PHRASE syntaxes, some multi-buffer phrases omitted
  <ADDR>a<INPUT>                _append_ INPUT after address
        b<buffer>               make buffer the current buffer
  <ADDR>c<INPUT>                _clobber_ address with INPUT
  <ADDR>d                       _delete_ addressed range of text
        e<file>                 _edit_ file, make file current buffer
        f<name>                 rename current buffer
  <ADDR>g<PAT> PHRASE           do PHRASE _if_ PAT matches in ADDR
        h                       You're soaking in it.
  <ADDR>i<INPUT>                _insert_ INPUT before address
  <ADDR>k                       mark address for reference as '
  <ADDR>m<ADDR>                 move, not copy
        n                       list buffers
  <ADDR>p                       _print_ to stdout. usual default command.
        q                       _quit_. Always works the second time.
  <ADDR>r<file>                 _read_ file into buffer after ADDR
  <ADDR>s<PAT><LIT>             use <ADDR>x<PAT>c<INPUT> instead
  <ADDR>t<ADDR>                 copy
        u                       undo. Unlimited, but one-way.
  <ADDR>v<PAT> PHRASE           do PHRASE if PAT _doesn't_ match in ADDR
  <ADDR>w<file>                 _write_ out ADDR. default is whole buffer.
  <ADDR>x<PAT> PHRASE           for each match of PAT in ADDR do PHRASE
  <ADDR>y<PAT> PHRASE           do PHRASE on text between each PAT in ADDR
............................................................................



Rick Hohensee
Forth, unix, nutmeg, tinsel


  reply	other threads:[~2001-01-02 17:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-23 19:34 anothy
2001-01-02 17:35 ` cLIeNUX user [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-03  0:34 Russ Cox
     [not found] <200012222249.XAA04024@unix12.planete.net>
2000-12-23  3:46 ` Boyd Roberts
2000-12-23  9:53   ` matt
2000-12-23 11:26     ` Boyd Roberts
2000-12-23 11:54       ` matt
2000-12-24  1:18         ` Boyd Roberts
2000-12-23  1:13 forsyth
     [not found] <200012222214.XAA00448@unix12.planete.net>
2000-12-22 22:34 ` kilgore
2000-12-22 22:48 ` James A. Robinson
2000-12-22 14:21 rob pike
2001-01-02 17:24 ` cLIeNUX user
     [not found] <rsc@plan9.bell-labs.com>
2000-12-22  6:37 ` Russ Cox
2000-12-23  2:51   ` Scott Schwartz
2000-12-22  6:33 anothy
2000-12-22 14:14 ` Mark C. Otto
2000-12-22 22:07 ` Boyd Roberts

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=t4aapatmrv54e@corp.supernews.com \
    --to=r@your_host.com \
    --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).