File: parm.sh

package info (click to toggle)
bashdb 4.0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,820 kB
  • ctags: 942
  • sloc: sh: 10,581; lisp: 885; makefile: 449; ansic: 325
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: ***