File: examples.sh

package info (click to toggle)
jcdf 1.2.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: java: 5,315; makefile: 198; sh: 98
file content (26 lines) | stat: -rwxr-xr-x 449 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
#!/bin/sh

# Utility file to generate an HTML file with several example invocations
# of a command-line tools
#
# Usage:
#   examples.sh <base-cmd> <args1> <args2> ...

echo "<html>"
echo "<body>"
echo "<pre>"
basecmd="$1"
shift
while [ $# -gt 0 ]
do
   args="$1"
   shift
   echo "<hr>"
   echo "% $basecmd $args"
   echo "<div style='background-color:lavender'>"
   $basecmd $args
   echo "</div>"
done
echo "</pre>"
echo "</body>"
echo "</html>"