LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2010, 04:37 PM   #1
vaibhavs17
Member
 
Registered: Mar 2009
Posts: 49

Rep: Reputation: 1
I want to understand script


Hi all,

i could not understand below script


dsuser_exists=$TMPDIR/dsuser.exists.$$
dsuser_exists_temp=dsuser.exists.$$
rm -f $dsuser_exists
cd $TMPDIR

sqlplus -s / <<-! > /dev/null 2>&1
set termout off linesize 1000 feedback off pagesize 0
spool $dsuser_exists_temp
show user
exit
!
cd -
if [ ! -f $dsuser_exists ]; then
echo "incorrect userid/password@dbname" >&2
exit 2
fi
rm -f $dsuser_exists
return 0


does first line create file in tmp directory with dsuser.exists.* ?
or we are assigning the path of existing file in this directory?
Please let me know
I am getting below error
incorrect userid/password@dbname
Thanks
Vaibhav Saxena
 
Old 10-19-2010, 05:14 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It just assigns a name of a file that's comprised of
$TEMPDIR, the string dsuser.exists and the current PID.
 
Old 10-19-2010, 05:46 PM   #3
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
i'm pretty sure the file gets created by the spool command, that is if you had a successful login. i think you need to pass the userid and password on the command line.

HTH.
-RN.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help me understand this Perl script please. It's not homework. vxc69 Programming 33 08-03-2010 10:11 AM
I cannot understand this perl script mq15 Linux - Server 3 10-12-2009 12:44 AM
BASH script does not work. Do not understand why. SteveInTallyFL Linux - Newbie 7 12-01-2008 09:32 AM
Perl Script..Difficult to understand ?? ajeetraina Linux - General 2 02-20-2008 11:17 PM
Help me understand this shell script dwhitney67 Linux - Software 2 10-18-2007 09:02 AM


All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration