Database Administration (MOSC)

MOSC Banner

Can you put conditional logic in the glogin.sql file?

edited Dec 5, 2012 10:22AM in Database Administration (MOSC) 6 commentsAnswered
I would like to place the following in my glogin.sql file but it causes problems when I'm running sql scripts from a shell script.  The host part of the command gets the width of the current window and writes it out to a file with the "set linesize" command.

I would like to somehow put some login in to say that if the width of the window is determined to be zero (i.e. a sql script is being run) then don't run the set linesize command.  Any ideas?

HOST "echo "set linesize $(stty -a | head -n1|cut -f7 -d' '|cut -f1 -d';')" > /tmp/.tmp.sql

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center