From owner-freebsd-questions Fri Aug 17 1:18:10 2001 Delivered-To: freebsd-questions@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 7BE5737B405 for ; Fri, 17 Aug 2001 01:18:05 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from blossom.cjclark.org (pool0642.cvx20-bradley.dialup.earthlink.net [209.179.252.132]) by snipe.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id BAA06796; Fri, 17 Aug 2001 01:18:02 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.4/8.11.3) id f7H8I0x08362; Fri, 17 Aug 2001 01:18:00 -0700 (PDT) (envelope-from cjc) Date: Fri, 17 Aug 2001 01:18:00 -0700 From: "Crist J. Clark" To: parv Cc: f-q Subject: Re: long options in shell script Message-ID: <20010817011800.P4232@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20010817015201.A26996@moo.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010817015201.A26996@moo.holy.cow>; from parv_@yahoo.com on Fri, Aug 17, 2001 at 01:52:01AM -0400 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 Fri, Aug 17, 2001 at 01:52:01AM -0400, parv wrote: > i got tired of making symlinks to a script and behaving depending on > basename. > > so i am searching for a way to implement long options (bourne shell). > does anybody have short example or where to find one? Not sure what you mean by this. > another question, is it possible to write "module" in bourne shell > and be usable in other sh scripts? You can put some shell functions in a file and load it, $ cat myfunctions sample_func ( ) { echo "Sample function" } $ cat loadingfile #!/bin/sh . myfunctions sample_func $ ./loadingfile Sample function $ -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message