🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #910

Arguments for subroutines

#910
From: Kevin Burton
Date: Fri, 21 Aug 1992 18:21
25 lines
1131 bytes
I have bash-1.12 and am trying to convert some CSH aliases to subroutines
in bash. I want to be able to get at all of the arguments from a specified
argument on (like !:3* in CSH).

foo ()
{
	echo $1;
# This of course does not work but I want to be able to do something
# like this.
	echo $2*;
}

I have looked on the info pages and found very little documentation at all
on these "subroutines".

Does anyone know how I might do this ? Do I have to concatenate all the the
arguments manually ? I hope not :-(

Thank you.

-
Kevin Burton
Noran Instruments				voice: (608) 831-6511 x317
2551 West Beltline Highway, Room 532		  FAX: (608) 836-7224
Middleton, WI 53562				email: kburton@noran.com
Technical Details
Message-ID: <9208211821.AA02760@iowa.YP.solsys>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!iowa.UUCP!kburton

Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!iowa.UUCP!kburton
From: kburton@iowa.UUCP (Kevin Burton)
Subject: Arguments for subroutines
Message-ID: <9208211821.AA02760@iowa.YP.solsys>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 21 Aug 1992 18:21:18 GMT
Approved: bug-bash@prep.ai.mit.edu
Lines: 26