zsh-users
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@dhduvall.student.Princeton.EDU>
To: zsh-users@math.gatech.edu
Subject: Re: interactive vs cron called
Date: Thu, 18 Dec 1997 20:44:45 -0500	[thread overview]
Message-ID: <19971218204445.01874@lorien.princeton.edu> (raw)
In-Reply-To: <hvgpvmujpcr.fsf@vinnie.cc.gatech.edu>; from Jason Zapman II on Thu, Dec 18, 1997 at 04:47:16PM -0500

Checking the return value of tty -s does the trick for me in a similar
situation (distinguishing between command-line invocation and getting
called as a pipe), as it tells you what's attached to stdin.  I'm pretty
sure that cron runs its jobs with stdin not connected to anything, so that
trick ought to work for you, too.

Perl has a builtin function for this, as the -t flag to the [ function.  It
might be useful to have this functionality in zsh, too, but as it's
obviously possible with a functioning unix setup, it's not necessary.

Danek


  reply	other threads:[~1997-12-19  2:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-18 20:30 Jason Zapman II
1997-12-18 21:11 ` Frank Li
1997-12-18 21:47 ` Jason Zapman II
1997-12-19  1:44   ` Danek Duvall [this message]
1997-12-19  2:34     ` Manual removal ramos
1997-12-18 21:05 interactive vs cron called Sweth Chandramouli
1997-12-19  9:14 John Riddoch

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=19971218204445.01874@lorien.princeton.edu \
    --to=duvall@dhduvall.student.princeton.edu \
    --cc=zsh-users@math.gatech.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).