Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-19-2010, 04:37 PM   #1
Registered: Mar 2009
Posts: 51

Rep: Reputation: 1
I want to understand script

Hi all,

i could not understand below script

rm -f $dsuser_exists

sqlplus -s / <<-! > /dev/null 2>&1
set termout off linesize 1000 feedback off pagesize 0
spool $dsuser_exists_temp
show user
cd -
if [ ! -f $dsuser_exists ]; then
echo "incorrect userid/password@dbname" >&2
exit 2
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
Vaibhav Saxena
Old 10-19-2010, 05:14 PM   #2
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
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.



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 > Forums > Linux Forums > Linux - Newbie

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

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