Skip to content

Instantly share code, notes, and snippets.

@mortenbra
Created March 19, 2017 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortenbra/9af4b0211782161619c0bab01ed7031a to your computer and use it in GitHub Desktop.
Save mortenbra/9af4b0211782161619c0bab01ed7031a to your computer and use it in GitHub Desktop.
Bash script to run sqlplus from VS Code for Mac/Linux
#!/bin/sh
# make sure script uses correct environment settings for sqlplus
source ~/.profile
# run sqlplus, execute the script, then get the error list and exit
sqlplus $1 << EOF
$2
@_show_errors.sql
exit;
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment