#!/bin/ksh@H_403_1@
su - oracle << !@H_403_1@
echo "select 'alter system kill session '''||sid||''||','||serial#||''';' from v\\\$session where username='C##SCOTT';" > sel.sql@H_403_1@
sqlplus / as sysdba <<EOF @sel.sql 1>result.log 2>&1@H_403_1@
exit@H_403_1@
EOF@H_403_1@
cat result.log | grep "alter system kill session" 1>exc.sql 2>&1@H_403_1@
sqlplus / as sysdba <<EOF @exc.sql 1>>result.log 2>&1@H_403_1@
exit@H_403_1@
EOF@H_403_1@
!@H_403_1@