#!/usr/bin/ksh ###################################################################### # schemadump.sh - dump to STDOUT any productline schema in csv format # Ron Wright and J. David Schronce ###################################################################### if [ $# -eq 0 ]; then echo "\nUSAGE: `basename $0` " ## Get list of productlines echo "\nAvailable Productlines:" rngdbdump -cnt gen prodline \ | cut -d, -f1 \ | sed 's/"//g' \ | sort exit fi pl=$1 dmpdict -arf $pl \ | grep "^FILE " \ | cut -f2 -d" " \ | while read table do dbdesc $pl ${table} \ | tail +7 \ | awk '{print "'$table',"$1"," $6}' done