Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass command to new shell in ksh? 1

Status
Not open for further replies.

jouell

MIS
Nov 19, 2002
304
US
Hi!

Not sure if this is a script question or not?

I have an alias in ksh (version to su to another user:
alias suo='su - oracle'

How can i make it so that once i become that user i
can source a file automatically?

IE this does not work:
alias suo='su - oracle && . /.jo'

I want it to be different for me as many people will su to oracle.


Thanks!
-John
 
Try :

alias suo='su - oracle -c ". ./.jo ; exec $SHELL"'


Jean Pierre.

Jean Pierre.
 
Jean Pierre

You are THE BEST!!!!

PERFECT!!!!!

Thanks a million!!

-john
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top