Re: Adding entries to ldap addressbook
- To: mutt-users@xxxxxxxx
- Subject: Re: Adding entries to ldap addressbook
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 19:23:05 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date: from:to:subject:message-id:references:mime-version:content-type: in-reply-to; q=dns/txt; s=default; bh=KIjP/3iRka5NOjZ4295FpDTfR8 Y=; b=bTjnf0bKyDOVyq4UzvvNwexVtVz6R79GgLJT123mqb8M3MQYHjjkL1SjAL Pym5YtoJnZ3H/ZclupJRNrUkOQNjYbbMTzUdUC1vTHcmwMXr7TfYDB0DNpx5wg0a P6ZIFe8dTTC+iCYf7y/Pjc+nzcHeq0Fd1ySzUTHwOXXZBYsI8=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=axdZ0+t4z+uDWpJbwbEng7tLbJIefi2JKoTEjmYk3i70ue2KH0bqdNdwkYourzsZMkPoY9wJdkJHFhwlPVp9hB2q4lREzlTSD65HplLSwl9gSnq7cx4kL2YFsmobyIh2RvHSS9uuSxeJkotyzhgE+0YpLkDZW1st8x4kJWYCzHU=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20080228234618.GA25482@SamZwo>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20080227174020.GA30153@SamZwo> <20080227210314.GD24299@xxxxxxxxxxxxx> <20080228234618.GA25482@SamZwo>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.17 (2008-01-14)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, February 29 at 12:46 AM, quoth Nathan Huesken:
> So the script needs to get the eMail from stdin, but also be
> intaractive with the user (utilizing the read command).
>
> If I do:
> <pipe-message>script<enter>
The reason the read command exits is that, by default, the read
command will read from stdin. Since stdin is the *message*, which by
that point you've already processed, you need to get the read command
to read from the *terminal* instead of stdin.
The same thing would happen if you did something like this:
cat message | script
So, in your script, you have to be able to tell the read command to
read from the terminal.
The easiest way may be to do something like this in your script:
read -p 'is this correct? [y/n] ' answer <$TTY
~Kyle
- --
Where justice is denied, where poverty is enforced, where ignorance
prevails, and where any one class is made to feel that society is an
organized conspiracy to oppress, rob and degrade them, neither persons
nor property will be safe.
-- Frederick Douglas
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFHx155BkIOoMqOI14RAugMAKDQEquNeZM8j1honLx58fGRcQuFPgCgo4QE
nIknt+rz0s9nll5o4GmJBvk=
=wE4t
-----END PGP SIGNATURE-----