🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #53

Re: using functions in sh

#53
From: Boyd Roberts
Date: Tue, 03 Nov 1992 08:27
18 lines
1072 bytes
In article <1992Nov2.193223.18537@panther.mot.com>, sacks@panther.mot.com (Dennis Sacks) writes:
> I don't seem to have a good shell programming guide handy -- can someone tell me
> what different contexts you can use a shell function in?

sh(1) is a good start.

> var=my_funct		# ?

var is set to the string my_funct.

> var=`my_funct`		# ?

my_funct is run and var is set to its output.


Boyd Roberts			boyd@prl.dec.com

``Not only is UNIX dead, it's starting to smell really bad.''  -- Rob Pike
Technical Details
Message-ID: <1992Nov3.082748.12281@prl.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!decwrl!pa.dec.com!decprl!decprl!boyd
References: <1992Nov2.193223.18537@panther.mot.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!decwrl!pa.dec.com!decprl!decprl!boyd
From: boyd@prl.dec.com (Boyd Roberts)
Subject: Re: using functions in sh
Message-ID: <1992Nov3.082748.12281@prl.dec.com>
Keywords: sh
Sender: news@prl.dec.com (USENET News System)
Nntp-Posting-Host: prl313.prl.dec.com
Organization: Digital Equipment Corporation - Paris Research Laboratory
References:  <1992Nov2.193223.18537@panther.mot.com>
Date: Tue, 3 Nov 1992 08:27:48 GMT
Lines: 18