Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2001 01:18:00 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        parv <parv_@yahoo.com>
Cc:        f-q <freebsd-questions@FreeBSD.ORG>
Subject:   Re: long options in shell script
Message-ID:  <20010817011800.P4232@blossom.cjclark.org>
In-Reply-To: <20010817015201.A26996@moo.holy.cow>; from parv_@yahoo.com on Fri, Aug 17, 2001 at 01:52:01AM -0400
References:  <20010817015201.A26996@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010817011800.P4232>