🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #47

using functions in sh

#47
From: Dennis Sacks
Date: Mon, 02 Nov 1992 19:32
27 lines
1025 bytes
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?

ie if I have:

my_funct() {
   echo "this is a test"
}

can I do these operations:

my_funct		# yes, I know this works
var=my_funct		# ?
var=`my_funct`		# ?

??

As an aside, where is the FAQ for this group?

---
Dennis Sacks         -      sacks@panther.mot.com
Info Enterprises     -      A Motorola Company

You are either a smoker or a nonsmoker.
The trick is to find out which one you are and be it.

- Robin Williams in Dead Again.
Technical Details
Message-ID: <1992Nov2.193223.18537@panther.mot.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!panther!sacks@panther.mot.com

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell
Path: arc1-ca.pugleaf.net!sparky!uunet!panther!sacks@panther.mot.com
From: sacks@panther.mot.com (Dennis Sacks)
Subject: using functions in sh
Message-ID: <1992Nov2.193223.18537@panther.mot.com>
Keywords: sh 
Sender: usenet@panther.mot.com
Nntp-Posting-Host: netmgr.panther.mot.com
Reply-To: sacks@panther.mot.com
Organization: Motorola Info Enterprises
Date: Mon, 2 Nov 1992 19:32:23 GMT
Lines: 28