Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: help with a script
"Ed Lufker" <elufker_at_shimi.swcp.com> wrote in message
news:9qqi79$8u6$1_at_sloth.swcp.com...
> Hi All:
>
> I have the following script, but it seems the $ sign in v$session is
> screwing me up, the scripts jumps to a new shell, and all is lost when
> that happens. How do I get around have a the $ sign in my script. The
> script follows
>
> sqlplus -s system/manager << EOF
> set head off
> spool e.out
> 'select sid,serial#,process from v$session where status='SNIPED'';
> exit
> EOF
> sed -n -e '/^SQL/ !p' e.out > e2.out
> while read a b c
> do
> svrmgrl << EOF
> connect internal;
> alter system kill session '$a, $b';
> EOF
> kill -9 $c
> done < e2.out
>
> Thanks for any help here
> Eddie Lufker
use v\$session
Hth
Sybrand Bakker
Senior Oracle DBA
Received on Sat Oct 20 2001 - 00:10:46 CDT
![]() |
![]() |