#!/bin/sh # example1-5.sh # generate 1000 rows for a table called orders with 2 columns, # # first column of type number that can up to the size 9999999 that is unique, # second of type varchar2 of length 5 # with the respective column names orderno and purchase # piping straight to sqlplus, this saves the intermediate step of redirecting and # writing to a file and running sqlplus later echo -e "Enter your oracle username : \c" read username stty -echo # don't echo password echo -e "Enter your oracle password (input won't be displayed) : \c" read password stty echo echo ../../oragen --rows 1000 --table-name orders --gen-table \ --number --length 9999999 --unique --column-name orderno \ --varchar2 --length 5 -C purchase \ | sqlplus -S $username/$password unset username unset password # NOTE: again be careful about specfying username and password on the command line