How does shell connect to other users to execute scripts?
Source: Internet
Author: User
How to connect shell to other users to execute the script-Linux general technology-Linux technology and application information, the following is a detailed description. I used to have a script executed under root, and a new user app was created later. I need to change the script to be executed under this new user, but there is a stored procedure for calling oracle, now, the error "standard in must be a tty" is reported. Let's take a look at how to solve the problem or how to write it. Thank you. The script is as follows:
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK
Export ORACLE_BASE =/oracle/app
Export ORACLE_HOME =/oracle/app/product/10.2.0/db_1
Export ORACLE_SID = ETL
Export PATH = $ ORACLE_HOME/bin: $ PATH
######################################## ##
Su-oracle-c "sqlplus etl/etl @ ETL" <!
Exec PROC_BACKUP_TEST;
Exit
!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service