Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

SU and Standard Output

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-15-2013
u20sr u20sr is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 4 August 2014, 9:37 AM EDT
Posts: 21
Thanks: 11
Thanked 0 Times in 0 Posts
Sun SU and Standard Output

Bit of a strange one.

Have a script called rapidclone_test.sh which calls Oracle rapidclone using su -c as an oracle osuser. However, if I control+c out to the calling shell anything entered is not displayed on the terminal. Any command executes successfully though.

Why is the standard input not being directed to the screen?

Running the script ->

Code:
orakrull@vq97eda> ./rapidclone_test.sh
Password:
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA
                        Oracle Applications Rapid Clone
                                 Version 12.0.0
                      adcfgclone Version 120.31.12010000.8
Enter the APPS password :

control+c ->

Code:
orakrull@vq97eda> ./rapidclone_test.sh
Password:
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA
                        Oracle Applications Rapid Clone
                                 Version 12.0.0
                      adcfgclone Version 120.31.12010000.8
Enter the APPS password : orakrull@vq97eda>

return a few times and then ls -al ->

Code:
orakrull@vq97eda> ./rapidclone_test.sh
Password:
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA
                        Oracle Applications Rapid Clone
                                 Version 12.0.0
                      adcfgclone Version 120.31.12010000.8
Enter the APPS password : orakrull@vq97eda> orakrull@vq97eda> orakrull@vq97eda> orakrull@vq97eda> orakrull@vq97eda> orakrull@vq97eda> total 64
drwxr-xr-x   2 orakrull dba          512 Aug 15 11:27 .
drwxr-xr-x   5 orakrull dba          512 Aug 14 12:38 ..
-rwxr-xr-x   1 orakrull dba          160 Aug 15 12:10 rapidclone_test.sh

rapidclone_test.sh looks like this ->

Code:
su - orakrull -c "perl $ORACLE_BASE/appsutil/clone/bin/adcfgclone.pl dbTier"

Sponsored Links
    #2  
Old Unix and Linux 08-16-2013
ahamed101's Unix or Linux Image
ahamed101 ahamed101 is offline Forum Advisor  
root is god!!!
 
Join Date: Sep 2008
Last Activity: 23 February 2015, 12:53 AM EST
Location: San Jose, CA
Posts: 1,910
Thanks: 54
Thanked 486 Times in 479 Posts
Try typing in

Code:
stty echo

--ahamed
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Command understanding the output file destination in case of standard output!!!!! ravisingh Red Hat 3 02-22-2013 04:41 PM
How to execute standard output ? Bertieboy7 Shell Programming and Scripting 3 11-07-2010 10:27 AM
Redirect Standard output and standard error into spreadsheet killaram UNIX for Dummies Questions & Answers 6 05-06-2010 12:00 PM
Standard output and redirection jerardfjay Shell Programming and Scripting 2 06-27-2005 11:03 AM
Standard Output dbrundrett Shell Programming and Scripting 3 05-21-2004 05:08 PM



All times are GMT -4. The time now is 01:18 AM.