What’s your favorite shell in Windows?

I just wrote one of my first powershell script yesterday, it has a pretty nice syntax actually, and no need to download anything like cygwin or other unix-like shell to your PC.

PS> $stmt = "set hea off`n"
PS> $stmt += "select 'hello world' from dual;"
PS> $res = ($stmt | sqlplus -s scott/tiger)
PS> $res

hello world

Pretty cool 🙂

Published by Laurent Schneider

Oracle Certified Master

Join the Conversation

9 Comments

  1. One I like is

    PS> $dbs = ‘db1 db2 db3 db4’.split()
    PS> $dbs | foreach { ‘select count(*) from v$session;’ | sqlplus -s system/pw@$_ }

    Neat 🙂

  2. Laurent & Paul. Thanks for sharing this. Will make my life easier on windows to control remote databases 😉

Leave a comment

Your email address will not be published.