01-04-2006
Thanks it worked
Thanks Prederabo !!!!,
It worked for me...
The remaining commands ran in the newly created shell..
Thanks again ...
hkapil
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I create a K Shell which would silently (without user input) logon to Oracle and
run an SQL script?
Any help will be greatly appreciated.
Steve (1 Reply)
Discussion started by: stevefox
1 Replies
2. Shell Programming and Scripting
Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u
I need to write a shell script which will run the following commands
pg_dump bank > backup(Enter)
Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
Discussion started by: perk_bud
23 Replies
3. Shell Programming and Scripting
Dears,
I'm new in shell scripting and i need your help, i would like to know how can i create a script to ftp to a certain unix/linux machine/server IP address and get a file for example without user intervention? How can i force the script to use a certain username and password to access this... (4 Replies)
Discussion started by: Dendany83
4 Replies
4. Shell Programming and Scripting
When my script deals with large input files like 22Gb or 18 GB the basic commands like sort or join fails when run from inside the shell scripts. Can there be any specific reason for this?
For e.g.
sort -u -t "," -k1,1 a.csv > a.csv.uniq"
sort -u -t "," -k1,1 b.csv > b.csv.uniq"
The... (3 Replies)
Discussion started by: esha
3 Replies
5. Shell Programming and Scripting
hi,
how to write shell script that runs different commands(like:ls,ps,ls-l) in differnt terminals(each command should run in different terminal).
my main motive is to run different 'c' program exe's available in different locations in different terminals.
thanks
sai (2 Replies)
Discussion started by: saidopdf
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
script> isumid 98765432
if i give above command in cmd prompt it is running the same thing if i give inside the shell script it is not working
below is the code
#!/bin/bash
isumid 98765432
please give me a solution (16 Replies)
Discussion started by: Ramrangasamy
16 Replies
7. Shell Programming and Scripting
I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using
%BASH% --login -i "/cygdrive/d/script.sh"
, where %BASH% is an environment variable in Windows set to
C:\cygwin\bin\bash.exe.
I have a created a Cygwin environment variable $EXE_PATH =... (3 Replies)
Discussion started by: HemanthJayasimh
3 Replies
8. Shell Programming and Scripting
Hello
I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that:
#!/bin/ksh
echo "Start ....."
rman target=/ << EOF
RUN {
delete force noprompt archivelog until time 'sysdate-10';
}
EXIT;
EOF
echo "END ..."
echo... (6 Replies)
Discussion started by: samer.odeh
6 Replies
9. Shell Programming and Scripting
Hi ,
I have 4 scripts example script1,script2,script3,script4 .
I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies .
Once script1,script2 and script3 got completed successfully , I have to trigger script4.
Can someone help me on this how to... (10 Replies)
Discussion started by: vinothsekark
10 Replies
10. Shell Programming and Scripting
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
su(1) General Commands Manual su(1)
NAME
su - Substitutes user ID temporarily
SYNOPSIS
su [- | -f] [user] [shell_option] [shell_command]
OPTIONS
Prevents the user's shell initialization file from being executed by passing the -f option to the user's shell, thus making su start up
faster. The -f option is supported by the csh family of shells. Simulates a full login by executing the commands in either the and files
for csh or the file for sh and ksh and by setting the current working directory to the user's home directory. Passes the specified shell
option flag to the newly invoked user's shell for execution. The shell_option must be supported by the invoked shell. The csh, sh, ksh, and
any other interactive command shell support the commonly used -c shell option. By default (no "shell_option"), the shell is opened with the
-i (interactive) shell option. See the reference page for the shell you are using for more information on the shell options. Passes the
specified command to the newly invoked user's shell for execution. The shell_command must be supported by the invoked shell.
DESCRIPTION
The su command demands the password of the specified user, and if it is given, changes to that user and invokes the user's shell without
changing the current directory.
Except in a case where the - option is used, the user environment is unchanged except for HOME, SHELL, USER, and LOGNAME which are taken
from the password file for the user being substituted (see environ). The new user ID stays in force until the shell exits.
If no user is specified, root is assumed. Only users who belong to group number 0 (system) can issue su to become root, even with the root
password. To remind superusers of their responsibilities, the shell substitutes a # (number sign) for its usual prompt.
Shell commands may be passed to the shell that is spawned by su by including them on the command line after the su flags and arguments.
After the flags recognized by su and the user argument are processed, unrecognized command line flags (shell_options) and/or arguments
(shell_commands) are passed to the shell for execution. If the spawned shell does not support the command or the format of the command, the
command is not executed and the resulting shell behavior and error messages are determined by the shell.
Security Restrictions
The su command fails if any lock conditions exist on the target account. Specifically, if the destination account was retired, if the num-
ber of unsuccessful login attempts exceeds the maximum allowed, if the administrative lock was applied, or the password's lifetime was
exceeded, the Information System Security Officer (ISSO) must unlock the destination account before any user can log in to it or use su to
transition to it.
SECURITY NOTE
This security-sensitive command uses SIA (Security Integration Architecture) as an interface to the security mechanism(s) that perform the
actual user validation. See the matrix.conf(4) reference page for more information.
ENVIRONMENT VARIABLES
The following environment variables affect the behavior of su:
SEE ALSO
Commands: csh(1), ksh(1), sh(1)
su(1)