File: parm.sh

package info (click to toggle)
bashdb 3.1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,252 kB
  • ctags: 117
  • sloc: sh: 4,880; pascal: 3,186; lisp: 484; makefile: 315; ansic: 294
file content (33 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!../../bash

fn1() {
  x="fn1 started"
  if (( $1 == 0 )) ; then
    fn2 "testing 1" "2 3"
    return
  fi
  let a=$1-1
  fn1 $a 
  x="fn1 returning"
}

fn2() {
  x="fn2 started"
  echo "fn2: $1 $2"
  fn3
  x="fn2 returning"
}

fn3() {
  echo "fn3: $1 $2"
  x="fn3 returning"
}

x="main"
fn1 5
echo "exit 5" | bash
exit 0
#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***