#!/bin/bash
sqp="sqlplus -S sys/oracle as sysdba"
test -z $1 && (echo "show pdbs" | $sqp) && echo "*** help: ./rmdb.sh pdb_name ***" && exit

$sqp <<EOT
alter pluggable database $1 close IMMEDIATE;
drop pluggable database $1 including datafiles;
EOT