Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pass a unix variable into isql

26 views
Skip to first unread message

Soni

unread,
Jul 3, 2001, 1:27:03 PM7/3/01
to
How do I pass a unix variable into the file, <filename> when use

isql -Usa -Sserver -Ppwd -i<filename>

I do not want to use the isql -Usa -Sserver -Ppwd <<EOF syntax.

I use K shell

thanks

Tim Vernum

unread,
Jul 9, 2001, 1:44:39 AM7/9/01
to
pn_...@yahoo.com (Soni) wrote in message news:<952a034b.01070...@posting.google.com>...

> How do I pass a unix variable into the file, <filename> when use
>
> isql -Usa -Sserver -Ppwd -i<filename>

AFAIK, you can't.
isql doesn't interpret environment variables inside of scripts.

You might be able to use an isql replacement (like sqsh) to do this.

> I do not want to use the isql -Usa -Sserver -Ppwd <<EOF syntax.

Why not?

[NB: Passing your password on the isql commandline is a bad idea
(especially when you're logging in as sa), as other users can find it
with 'ps']

Soni

unread,
Jul 9, 2001, 1:39:21 PM7/9/01
to
Thanks for the post.

I will try using sqsh.

The reason i dont want to use the EOF syntax is bcos there is a whole
bunch of code in the given(<filename>) sql file (used by other apps)
that i dont want to replicate in my unix script file (with a cut &
paste)

Also, i am aware of the security hazard in passing the pwd at
commandline & i am not doing that. That usage was just in my
post...thanks tho! :)

0 new messages