supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "George Georgalis" <george@galis.org>
Subject: Re: problems with QMAILQUEUE and reading stdin
Date: Mon, 29 May 2006 09:37:44 -0400	[thread overview]
Message-ID: <20060529133744.GB15937@run.galis.org> (raw)
In-Reply-To: <1148905142.19941.57.camel@avirat>

On Mon, May 29, 2006 at 05:49:02PM +0530, B S Srinidhi wrote:
>On Mon, 2006-05-29 at 08:11 -0400, Charlie Brady wrote:
>> Why run cat unnecessarily (and depend on /dev/stdin which only sometimes 
>> exists)?
>> 
>> Try:
>> 
>> tmp=$pq/$(/usr/pkg/bin/safecat "$pq/tmp" "$pq")

Thank you! I had tried all sorts of ways to read stdin; but I was
always referencing the dev file directly (or cat -). The implicit
stdin worked on first try. :)

>hmm... Yeah you are right. :) But is the above thing portable? I mean,
>would this work with shells other than BASH?

well I'm using it with NetBSD /bin/sh which I understand is the
closest thing to the original /bin/sh available. (the ash shell
is the closest in Linux).

I'd prefer to specify stdin as an argument, I'd like to retain
that style for helping people (including myself) interpret the
code.  I'm going to take it up on some netbsd list, they are
pretty good at fixing things if they aren't working right.

Thanks again!

// George

-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org


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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-29  1:58 George Georgalis
2006-05-29  5:23 ` B S Srinidhi
2006-05-29 12:11   ` Charlie Brady
2006-05-29 12:19     ` B S Srinidhi
2006-05-29 13:37       ` George Georgalis [this message]
2006-05-29 14:38         ` Charlie Brady
2006-05-29 15:49           ` George Georgalis
2006-05-29 15:56             ` Charlie Brady
2006-05-29 20:48             ` George Georgalis
2006-05-29 13:59       ` Charlie Brady

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=20060529133744.GB15937@run.galis.org \
    --to=george@galis.org \
    /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).