- Timestamp:
- 07/05/08 10:08:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh
r3834 r3848 1 1 #!/bin/bash 2 2 3 if [ $# - ne 3]3 if [ $# -lt 2 ] 4 4 then 5 echo 1>&2 Usage: $0 username database hostname 5 echo 1>&2 Usage: $0 username database [hostname] [port] 6 echo 1>&2 - hostname defaults to 'localhost' 7 echo 1>&2 - port defaults to 5432 6 8 exit 127 7 9 fi 8 10 9 dbOptions="-U $1 -d $2 -h $3" 11 port="5432" 12 if [ $# -gt 3 ] 13 then 14 port=$4 15 fi 16 17 host="localhost" 18 if [ $# -gt 2 ] 19 then 20 host=$3 21 fi 22 23 dbOptions="-U $1 -d $2 -h $host -p $port" 10 24 echo $dbOptions 11 25
Note: See TracChangeset
for help on using the changeset viewer.