9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Rudolf Sykora <rudolf.sykora@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] problems with redirection in rc
Date: Tue,  5 May 2009 15:29:53 +0200	[thread overview]
Message-ID: <a560a5d00905050629g7b6edfeavf6aa27a6fa5124a8@mail.gmail.com> (raw)

Hello everyone!

To get some useful information from a file I write:

; for (i in *_r) @{cd $i; echo -n $i^'	'; grep total otdit | grep -v na}

to get lines from the 'otdit' files in *_r subdirectories with the
word 'total' on them, but no 'na' on them. This works to my liking and
produces sth. like

10_r	total        :   9.4105E-01
11_r	total        :   9.3897E-01
12_r	total        :   9.3685E-01
13_r	total        :   9.3446E-01
14_r	total        :   9.3180E-01
15_r	total        :   9.2890E-01
16_r	total        :   9.2589E-01
17_r	total        :   9.2299E-01
18_r	total        :   9.1860E-01
...
9_r	total        :   9.4317E-01

Ok, now I wanted to save this, so I naively appended '> res'. But then
the contents of 'res' was only the last line:
9_r	total        :   9.4317E-01

Ok, so I thought '>> res' should be used instead. But then I got sth. like

^[];/home/sykora/CALC/doing/tests/9_r/-xeon4\a9_r	total        :   9.4317E-01
^[];/home/sykora/CALC/doing/tests/10_r/-xeon4\a10_r	total        :   9.4105E-01
^[];/home/sykora/CALC/doing/tests/11_r/-xeon4\a11_r	total        :   9.3897E-01
^[];/home/sykora/CALC/doing/tests/12_r/-xeon4\a12_r	total        :   9.3685E-01
^[];/home/sykora/CALC/doing/tests/13_r/-xeon4\a13_r	total        :   9.3446E-01
^[];/home/sykora/CALC/doing/tests/14_r/-xeon4\a14_r	total        :   9.3180E-01
^[];/home/sykora/CALC/doing/tests/15_r/-xeon4\a15_r	total        :   9.2890E-01
^[];/home/sykora/CALC/doing/tests/16_r/-xeon4\a16_r	total        :   9.2589E-01 ,

which quite surprised me... Can you tell me why this happens? I am running p9p.

Thanks
Ruda



             reply	other threads:[~2009-05-05 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 13:29 Rudolf Sykora [this message]
2009-05-05 13:59 ` roger peppe
2009-05-05 14:36   ` Rudolf Sykora
2009-05-05 14:07 ` Russ Cox
2009-05-05 14:54   ` Rudolf Sykora
2009-05-05 14:59     ` erik quanstrom
2009-05-05 15:20     ` roger peppe
2009-05-05 15:23       ` erik quanstrom
2009-05-05 15:44         ` roger peppe
2009-05-05 16:00           ` erik quanstrom
2009-05-05 16:00           ` Russ Cox
2009-05-05 14:17 ` Anthony Sorace
2009-05-05 14:28   ` Rudolf Sykora
2009-05-05 14:48   ` Rudolf Sykora

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=a560a5d00905050629g7b6edfeavf6aa27a6fa5124a8@mail.gmail.com \
    --to=rudolf.sykora@gmail.com \
    --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).