08-28-2012
What do you mean by second if doesnt work? You espect a value greater than zero and you get 0?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
trying this
===============================
Temp=`sqlplus -s user/passwd <<EOF
WHENEVER SQLERROR EXIT 1
set serverout on
set feedback off
set heading off
select nam from tabel1
where x=y;
EOF`
echo Temp>>$logfile
=================================
The select statement is... (2 Replies)
Discussion started by: amitkr
2 Replies
2. UNIX for Advanced & Expert Users
Hi all,
Iam facing a lot of problem while calling Oracle 10g SQLPLUS files from shell.
What is the standard procedures to be taken care.
Any help would be useful for me.
Thanks in advance,
Ganapati. (2 Replies)
Discussion started by: ganapati
2 Replies
3. Solaris
Ok. So I've finally compiled the latest version of GNU emacs on Solaris 5.8.
I've set putty up so that it sets TERM=xtermc. emacs now has syntax highlighting. The problem is, whenever I quit emacs, it changes the screen colors. The background is now the same as the color of the minibuffer. It... (1 Reply)
Discussion started by: m9dhatter
1 Replies
4. Shell Programming and Scripting
Hi my code looks like:
if test $STEP -le 10
then
.
.
ls -1d AM*-OUT|while read MYDIR
do
cd $MYDIR
ls |tail -n1| while read MYFILE
do
.
.
if test -s $MYFILE
then
sqlldr ....
rc=$?
if test $rc -ne 0 (3 Replies)
Discussion started by: anijan
3 Replies
5. Shell Programming and Scripting
This is a very simple problem, I am wondering why I can find no answer anywhere...
I have a script that can be run either sourced or not. This script has some place where it needs to quit execution (e.g., when an error is found)
If I "exit", the sourced call would exit the parent shell, but... (7 Replies)
Discussion started by: MadMage
7 Replies
6. Shell Programming and Scripting
Folks,
Below is a basic synopsis of the problem. I have a script that I need to check for some env vars and fail (exit the script) if they are not there. At the same time I need to set some default env vars. To do this I must run the script from the parent shell or source the script. Doing... (3 Replies)
Discussion started by: bashN00b
3 Replies
7. Shell Programming and Scripting
Hi all,
I have a scenario where im connecting to sqlplus executing a query,redirecting the output to a file and manipulating the file
MY CODE IS AS FOLLOWS
sqlplus -s /nolog << EOF > $UTILITIES_HOME/temp/analyze.temp.log &
set linesize 3000
set trimspool on
set pagesize... (2 Replies)
Discussion started by: niteesh_!7
2 Replies
8. Shell Programming and Scripting
sql_rows=`sqlplus -s / <<EOF
set heading off
set pagesize 1000
set tab off
set linesize 120 wrap off
column "Path" format a15
--column "No_Of_files" format a10
select tablespace_name, substr(file_name,1,instr(file_name,'/',1,2)) as "Path" , count(*) as "No_Of_files" from dba_data_files
... (7 Replies)
Discussion started by: desibabu
7 Replies
9. AIX
Hi guys,
Here is the error i get by running a "sqlplus -v" after installing an oracle client 10.2.0.5 on an AIX 5.3.9 server.
Could not load program sqlplus:
Symbol resolution failed for sqlplus because:
Symbol __pthread (number 307) is not exported from dependent
... (3 Replies)
Discussion started by: Chapel
3 Replies
10. Shell Programming and Scripting
Hi I am having a problem exiting a WHILE loop. I am on a Sun server using ksh.
I am running a Veritas Cluster Software (High Availablity) command to obtain a group status and grepping the command output for status "G" which means that the filesystem is frozen and therefore not available to... (3 Replies)
Discussion started by: bigbuk
3 Replies
LEARN ABOUT DEBIAN
sys::utmp::utent
Sys::Utmp::Utent(3pm) User Contributed Perl Documentation Sys::Utmp::Utent(3pm)
NAME
Sys::Utmp::Utent - represent a single utmp entry
SYNOPSIS
use Sys::Utmp;
my $utmp = Sys::Utmp->new();
while ( my $utent = $utmp->getutent() )
{
if ( $utent->user_process )
{
print $utent->ut_user,"
";
}
}
$utmp->endutent;
DESCRIPTION
As described in the Sys::Utmp documentation the getutent method returns an object of the type Sys::Utmp::Utent which provides methods for
accessing the fields in the utmp record. There are also methods for determining the type of the record.
The access methods relate to the common names for the members of the C struct utent - those provided are the superset from the Gnu
implementation and may not be available on all systems: where they are not they will return the empty string.
ut_user
Returns the use this record was created for if this is a record for a user process. Some systems may return other information
depending on the record type. If no user was set this will be the empty string. If tainting is switched on with the '-T' switch to
perl then this will be 'tainted' as it is possible that the user name came from an untrusted source.
ut_id
The identifier for this record - it might be the inittab tag or some other system dependent value.
ut_line
For user process records this will be the name of the terminalor line that the user is connected on.
ut_pid
The process ID of the process that created this record.
ut_type
The type of the record this will have a value corresponding to one of the constants (not all of these may be available on all systems
and there may well be others which should be described in the getutent manpage or in /usr/include/utmp.h ) :
ACCOUNTING - record was created for system accounting purposes.
BOOT_TIME - the record was created at boot time.
DEAD_PROCESS - The process that created this record has terminated.
EMPTY - record probably contains no other useful information.
INIT_PROCESS - this is a record for process created by init.
LOGIN_PROCESS - this record was created for a login process (e.g. getty).
NEW_TIME - record created when the system time has been set.
OLD_TIME - record recording the old tme when the system time has been set.
RUN_LVL - records the time at which the current run level was started.
USER_PROCESS - record created for a user process (e.g. a login )
for convenience Sys::Utmp::Utent provides methods which are lower case versions of the constant names which return true if the record
is of that type.
ut_host
On systems which support this the method will return the hostname of the host for which the process that created the record was started
- for example for a telnet login. If taint checking has been turned on (with the -T switch to perl ) then this value will be tainted
as it is possible that a remote user will be in control of the DNS for the machine they have logged in from. ( see perlsec for more on
tainting )
ut_time
The time in epoch seconds wt which the record was created.
BUGS
Probably. This module has been tested on Linux, Solaris, FreeBSD ,SCO Openserver and SCO UnixWare and found to work on those platforms.
If you have difficulty building the module or it doesnt behave as expected then please contact the author including if appropriate your
/usr/include/utmp.h
AUTHOR
Jonathan Stowe, <jns@gellyfish.com>
LICENCE
This Software is Copyright Jonathan Stowe 2001-2006
This Software is published as-is with no warranty express or implied.
This is free software and can be distributed under the same terms as Perl itself.
SEE ALSO
perl. Sys::Utmp::Utent
perl v5.14.2 2006-10-13 Sys::Utmp::Utent(3pm)