From owner-freebsd-questions Thu May 31 17:28:14 2001 Delivered-To: freebsd-questions@freebsd.org Received: from anime.net (anime.net [63.172.78.150]) by hub.freebsd.org (Postfix) with ESMTP id 5CA0337B422 for ; Thu, 31 May 2001 17:28:11 -0700 (PDT) (envelope-from eugene@anime.net) Received: (from eugene@localhost) by anime.net (8.9.3/8.9.3) id RAA30616 for freebsd-questions@FreeBSD.ORG; Thu, 31 May 2001 17:28:07 -0700 Date: Thu, 31 May 2001 17:28:06 -0700 From: Eugene Lee To: freebsd-questions@FreeBSD.ORG Subject: Re: shell scripts, file descriptor, and pw Message-ID: <20010531172806.A29639@anime.net> Mail-Followup-To: freebsd-questions@FreeBSD.ORG References: <50535058@toto.iv> <15126.56105.477926.485041@guru.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <15126.56105.477926.485041@guru.mired.org>; from mwm@mired.org on Thu, May 31, 2001 at 07:00:41PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, May 31, 2001 at 07:00:41PM -0500, Mike Meyer wrote: : Eugene Lee types: : > : > I'm trying to write a shell script using 'pw' that uses the '-h fd' : > option to lets you securely send a password to the program via a file : > descriptor. : : You don't create them, you just use them. You need to know that 0, 1 : and 2 are stdin, stdout and stderr, respectively. After reading your examples, I understand much better now. I was stuck in the mode of getting a file descriptor from some open()-ish function. I'll probably be using your last example using a here document. Thanks for the quick lesson! :-) -- Eugene Lee eugene@anime.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message