mkdb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. #
  3. # Script to create a table 'FPdev' and to fill it with data.
  4. # The script accepts an optional argument :
  5. # A database to connect to. (default 'testdb')
  6. #
  7. # Collect the database
  8. DATABASE=${1-./testdb.gdb}
  9. # Choose one of the following:
  10. # ISQL=isql
  11. ISQL=/opt/interbase/i586_V4.0G/bin/isql
  12. #
  13. # Don't edit after this.
  14. #
  15. echo -n "Creating and filling table FPdev in database $DATABASE..."
  16. ${ISQL} << EOF >/dev/null 2>&1
  17. CREATE DATABASE "$DATABASE";
  18. create table FPdev (
  19. id INT NOT NULL,
  20. UserName CHAR(255),
  21. InstEmail CHAR(255),
  22. PRIMARY KEY (id));
  23. insert into FPdev values ('1','Michael Van Canneyt','[email protected]');
  24. insert into FPdev values ('2','Florian Klaempfl','[email protected]');
  25. insert into FPdev values ('3','Carl-Eric Codere','[email protected]');
  26. insert into FPdev values ('4','Daniel Mantione','[email protected]');
  27. insert into FPdev values ('5','Pierre Muller','[email protected]');
  28. insert into FPdev values ('6','Jonas Maebe','[email protected]');
  29. insert into FPdev values ('7','Peter Vreman','[email protected]');
  30. insert into FPdev values ('8','Gerry Dubois','[email protected]');
  31. EOF
  32. if [ ! $? = 0 ]; then
  33. echo "Failed."
  34. else
  35. echo "Done."
  36. fi
  37. # Ready