File: mkdb.sh

package info (click to toggle)
libcatalyst-view-csv-perl 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 228 kB
  • sloc: perl: 1,622; sh: 14; makefile: 2
file content (17 lines) | stat: -rwxr-xr-x 412 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

DIR=`dirname "$0"`
TESTDB="$DIR/test.db"

rm -f "$TESTDB"
sqlite3 "$TESTDB" <<EOF
CREATE TABLE person (
	id integer primary key autoincrement,
	name text,
	age integer
);
INSERT INTO person ( name, age ) VALUES ( 'Alan', 42 );
INSERT INTO person ( name, age ) VALUES ( 'Bob', 27 );
INSERT INTO person ( name, age ) VALUES ( 'Charlie', 64 );
INSERT INTO person ( name, age ) VALUES ( 'Dave', 12 );
EOF