how to set up user environment in Solaris9?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to set up user environment in Solaris9?
# 1  
Old 07-01-2003
how to set up user environment in Solaris9?

The follwoing is my .cshrc:
and when I log in and type init, I got the follwoing message:

Usage: init [0123456SsQqabc]
and also my login prompt is not ORACLE.bantest>>


I believed I am running /bin/sh

****************************************************
#ident "@(#)local.cshrc 1.2 00/05/01 SMI"
umask 022
set path=(/bin /usr/bin /usr/ucb /etc .)
if ( $?prompt ) then
set history=32
endif
#
set prompt = "ORACLE.bantest>>"
alias init "/app/oracle/product/ora92/"
***************************************************

Thanks in advance
# 2  
Old 07-01-2003
If you are running sh then a .cshrc is not going to help you. .cshrc only works with csh.

The error message that you got indicates that you tried to run the systems init program. It resides in /usr/sbin. Is /usr/sbin on your PATH? /usr/sbin should really only be on root's PATH. Are you running as root? If that is the case I would suggest that you run as an ordinary user if at all possible.

sh is customized via .profile. But sh is a very simple shell and does not have aliases.

If you are running as a non-root user, changing the shell to csh might be an option. Then the .cshrc would be effective. But you have an error in yours. See that "if" statement? By checking if "prompt" is currently set, you are checking to see if the shell is interactive. You need to set your prompt inside that if statement. As it is, you are setting the prompt for all shells including non-interactive ones.
# 3  
Old 07-01-2003
Instead of set prompt, I type the following line:

PS1="`hostname`:`pwd`:>>"

and when I log back again, it workslike that:

bantest:/home/simt:>>

So, I am using bourne shell, is there any way I can create an alias in my .profile to cd to my oracle alert_db.log files?

The complete path is :

/app/oracle/product/ora92/admin/SEED/bdump

Thanks in advance.
P.S. I am pretty new to unix.
# 4  
Old 07-01-2003
The SunOS sh does seem to have functions (I just checked) so try this:
go() { cd /app/oracle/product/ora92/admin/SEED/bdump ; }
go
# 5  
Old 07-01-2003
It works just great!

Can I have multiple go() at the same time?
What if I also wanted to cd /app/oracle/product/ora92/TEST/bdump, how can I set up another go()?
Where can I find out all the functions that comes with SunOS sh?

Thanks in advanceSmilie
# 6  
Old 07-01-2003
sorry about that.
I figured out myself the above question.

You are great!Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to SET Environment variables

Hi Could you please tell me how to set environment variables in Unix ksh. And how can acess those varibles in shell scripts ( Please give the code with an example) For my scenario. We have written number of shell scripts with hard coded username and password. But if we want to... (1 Reply)
Discussion started by: shyamu544
1 Replies

2. SCO

Help finding where certain environment variables are set

i have two machines that should be identical but on one system there are some oracle environment (ORACLE_SID, ORACLE_HOME, etc...) variables that are not being set for the users. I am trying to find where those environment variables are being set on the system which is working properly. All... (5 Replies)
Discussion started by: kuliksco
5 Replies

3. Shell Programming and Scripting

Set environment

Hi, I can run shell script from the command line using $ . set If the run the script inside perl script using $var = system("set"); print $var; This prints 0. This command sets up the environment from command line. But when used inside the shell script or perl script it... (2 Replies)
Discussion started by: sandy1028
2 Replies

4. Solaris

set environment variable?

I am working with solaris 9 sunBlade150 Box. I Installed a program, need to set the environment variable so that when the executable is entered,it finds the path to the executable. The documentation for the software says: Set the appropriate environment variable: Connect to server failed;... (8 Replies)
Discussion started by: smartgupta
8 Replies

5. Shell Programming and Scripting

How does the environment stay set

I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script? Prescript #1 #RMAN Script #!/bin/ksh ORACLE_SID=INVPRD;export ORACLE_SID... (1 Reply)
Discussion started by: gzs553
1 Replies

6. Linux

How do i set environment variable

Hi, I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable. Let say I have a environment variable $Hack ; I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value. ... (4 Replies)
Discussion started by: ahjiefreak
4 Replies

7. Shell Programming and Scripting

Help to set the oracle environment????

Hi, I am trying to set the environment for my oracle database. I have 5 database in an unix box. My idea is to create 5 files for each database with the following script on it. After logging into the unix box ...just by typing the database name....the enviornment for the database... (2 Replies)
Discussion started by: castlerock
2 Replies

8. UNIX for Advanced & Expert Users

by using c++ how to set environment variables in unix

hi, I am writing c++ code in unix operating system.In that i need to set the environment variable in unix. suppose previously i have environment variable like path="something" now i need to change the path value to some othervalue . so that some other program will access that path value... (1 Reply)
Discussion started by: sada@123
1 Replies

9. UNIX for Advanced & Expert Users

set environment variable?

Installed a program, need to set the system up so that when the executable is entered, it finds the path to the executable. In Windows, set under system properties, advanced, environmental variables. How do I do this with Unix? Specifically using Solaris 9. I have tried: env... (3 Replies)
Discussion started by: kohoutek
3 Replies

10. UNIX for Advanced & Expert Users

Set up the own Unix ENvironment at home

Hello! All Unix Expert, I just graduated from college with Bachalor degree in Computer Information System, and decided to start my career in Unix System. I am trying to set up my own unix Environment at home so that I can get more hand on experience since the class offered by unix vendors are... (1 Reply)
Discussion started by: jung1975
1 Replies
Login or Register to Ask a Question