blob: 290994cdddab136a84d984274acb0dbb8cdb4d06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/tclsh
set tests {
{exec curl -i http://localhost:8000}
{exec curl -i http://localhost:8000/style.css}
{exec curl -i http://localhost:8000/index.html}
}
if [expr ($argc == 0)] {
set j 0;
foreach i $tests {
puts "($j) : [string range $i 13 end]"
incr j
}
} elseif [expr ($argc == 1)] {
set a [lindex $argv 0];
if { ($a >= 0) && ($a < [llength $tests]) } {
puts [eval [lindex $tests $a]]
} else {
puts "Argument not in range."
}
}
|