Skip to content

Instantly share code, notes, and snippets.

@wytten
Created January 31, 2018 18:21
Show Gist options
  • Save wytten/c610fbe7d26c3c980d19f43a8beffcf0 to your computer and use it in GitHub Desktop.
Save wytten/c610fbe7d26c3c980d19f43a8beffcf0 to your computer and use it in GitHub Desktop.
Bash function that executes Oracle SQL and builds URL and opens it with chrome
function report
{
num="$1"
chrome $(sqlplus -S username/password@connect_identifier <<EOF
set echo off
set verify off
set timing off
set heading off
set feedback off
set linesize 32767
set pagesize 0
select 'http://web.xyz.com/data/' || vin
from automobile_data
where license_number = '$num';
exit
EOF
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment