sql='sqlplus -S / as sysdba'
sql01="set timing off;\nset linesize 1000;\n col name format a20;\nselect con_id,name,open_mode from v\$pdbs where name'PDB\$SEED';"
echo "The pdb list:"
echo -e $sql01|$sql
echo -e 'Please input pdb name:(default is CDB$ROOT)'
read PDB_NAME
PDB_NAME=${PDB_NAME:=CDB\$ROOT}
sql02="alter session set container=$PDB_NAME;"
echo sql02
sqlplus -S / as sysdba