unix - Shell script for insert multiple records into a Database -


i have table in informix db want insert multiple records @ time. data 1 of column should unique & other column data may same records insert

typical insert statement use insert 1 row :

insert employee(empid, country, state) values(1, us, ca)

now want pass different values 'empid' column, & data in rest of columns can remain same.

i looking looping empid & prompting user enter start & end range of values empid when user enters start value 1 & end value 100, script should inset 100 records empid's 1 100

please notice need pass start , end parameters input arguments script:

#!/bin/sh  start=$1 end=$2  while [[ $start -le $end ]];   echo "insert employee(empid, country, state) values(${start}, us, ca)"   start=`expr $start + 1` done 

Comments