The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
linking in solaris9 biswajithit SUN Solaris 3 05-22-2008 10:23 AM
Samba 3.0.22 on Solaris9 Gegestic SUN Solaris 8 06-08-2006 11:58 AM
rsh and user environment jhansrod AIX 2 12-16-2005 04:14 PM
install solaris9-how to ! memo SUN Solaris 1 03-27-2005 01:54 PM
Solaris9 CreamHarry UNIX for Dummies Questions & Answers 3 05-28-2003 09:37 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-01-2003
simt simt is offline
Registered User
  
 

Join Date: Jul 2003
Posts: 18
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 (permalink)  
Old 07-01-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,126
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 (permalink)  
Old 07-01-2003
simt simt is offline
Registered User
  
 

Join Date: Jul 2003
Posts: 18
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 (permalink)  
Old 07-01-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,126
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 (permalink)  
Old 07-01-2003
simt simt is offline
Registered User
  
 

Join Date: Jul 2003
Posts: 18
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 advance
  #6 (permalink)  
Old 07-01-2003
simt simt is offline
Registered User
  
 

Join Date: Jul 2003
Posts: 18
sorry about that.
I figured out myself the above question.

You are great!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0