more script syntax

Rui Ferreira ruifmferreira at
Wed Oct 23 17:06:20 PDT 2002

From: "Eric Miller" <emiller at>
To: <lfs-support at>
Sent: Thursday, October 24, 2002 12:51 AM
Subject: more script syntax

> Again, my apologies as a .bat scripter.
> What is the syntax to define a subroutine in a bash script- the equivalent
> of the old BASIC gosub return
> for example:

short, unpolite answer: type 'man bash' in the console

also short but more direct answer:

functions must be declared before usage
after that, just call them by their name

- to declare -
marker ( private_variable )
    bzcat private_variable ...

- to use -
marker bash-2.05a

another source of examples is the lfs-bootscripts as they use pre-declared
(and externally declared) functions.

Also, a totally different approach for making a lfs-install script is Conrad
Newton's script.
Google around for it...

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list