On a UNIX shell (Bash), the following script works (meaning that the 'help' command is executed and then the program quits):
$ sqlplus /NOLOG <<EOF
help
exit
EOF
Note: sqlplus is a utility shipped with the Oracle Database binaries, but I don't care that tool. My question is about how to construct here-scripts!
My equivalent code for Powershell is:
PS> sqlplus /NOLOG @'
help
exit
'@
Unfortunately, it does not work.
Any suggestions?
Regards
jgn
Submitted via EggHeadCafe - Software Developer Portal of Choice
Get Silverlight 4 Installed: Tips and Tricks
http://www.eggheadcafe.com/tutorials/aspnet/05910e41-3846-4db9-8e1b-f54c56a64ed9/get-silverlight-4-install.aspx
PS> @'
one
two
'@ | Tee-Object tee.out
So, try
PS> @'
help
exit
'@ | sqlplus /NOLOG
- Larry
Cheers
jgn
Larry__Weiss wrote:
Consider this example of a here-string piped to Tee-ObjectPS> @'onetwo'@ |
22-Apr-10
Consider this example of a here-string piped to Tee-Object
PS> @'
one
two
'@ | Tee-Object tee.out
So, try
PS> @'
help
exit
'@ | sqlplus /NOLOG
- Larry
On 4/22/2010 7:25 AM, jgn dml wrote:
Previous Posts In This Thread:
Submitted via EggHeadCafe - Software Developer Portal of Choice
Using VSTO Add-In To Automate Frequent Excel 2007 Tasks
http://www.eggheadcafe.com/tutorials/aspnet/ff2d1d4b-aedf-4d14-9e60-39a86ccab5d6/using-vsto-addin-to-auto.aspx