File: parm.cmd

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 (48 lines) | stat: -rw-r--r-- 929 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
set trace-commands on
# Debugger test of: 
#  stack trace 
#  parameter display 
#  return command
#  evaluation of dollar variables $1, $2
#
###  Try a simple stack command...
where 1
step 2
where 2
###  Try printing a dollar variable...
p $1
###  Same thing using eval...
eval echo $1
###  Setting an action to print $1
a 4 echo "\\$1 at line 4 has value $1"
c fn2
# cont
###  First parameter should have embedded blanks...
where 8
p "dollar 1: $1"
###  Same thing using eval...
e echo "\\$1 is $1"
###  Should have embedded blanks...
p $2
e echo "\\$2 is $2"
continue fn3
###  Test return. Should go back to fn2 and then fn1...
return
return
###  Should not have done above-listed x=\"fn2\" assignment
p $x
where 7
return
where 6
return
where 5
return
return
where 3
### * Testing that exit status preserved on eval and print...
c 29
e echo "eval says exit was $?"
p "print says exit was $?"
info files
### * quitting...
quit