- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to add variables into this file?.cshrc profile...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:09 PM
тАО09-27-2007 11:09 PM
my user is user1 using SHELL=/usr/bin/csh
i want to run online
. /home/user2/env/environment.sh
but the result is:
serverunix 2: . /home/user2/env/environment.sh/usr/bin/.: Permission denied.
how could i enable to use ". /home/user2/env/environment.sh" (.)
the profile .cshrc contains:
========================================
# Default user .cshrc file (/usr/bin/csh initialization).
#
# @(#)B.11.11_LR
# Usage: Copy this file to a user's home directory and edit it to
# customize it to taste. It is run by csh each time it starts up.
# Set up default command search path:
#
# (For security, this default is a minimal set.)
set path=( $path )
# Set up C shell environment:
if ( $?prompt ) then # shell is interactive.
set history=20 # previous commands to remember.
set savehist=20 # number to save across sessions.
set system=`hostname` # name of this system.
set prompt = "$system \!: " # command prompt.
# Sample alias:
alias h history
# More sample aliases, commented out by default:
# alias d dirs
# alias pd pushd
# alias pd2 pushd +2
# alias po popd
# alias m more
endif
============================================
also ..how can i add new variables ..
i tried to add (connect direct processes):
set MANPATH=$MANPATH:home/user3/cdunix/ndm/man1
set NDMAPICFG=/home/user3/cdunix/ndm/cfg/cliapi/ndmapi.cfg
but it did not work...
how can i change the kind of profile into .cshrc ???... i know i have to do that into /etc/passwd file, but i do not have access there .. please let me know the answer of these 3 questions.
thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:23 PM
тАО09-27-2007 11:23 PM
Solutiontry:
setenv MANPATH ${MANPATH}:/home/user3/cdunix/ndm/man1
Also:
- there's no '/' before your home/... path.
- why the dot before:
/home/user2/env/environment.sh ?
What does /home/user2/env/environment.sh do?
Have you checked your environment? (with 'env')
Exists:
/home/user2/env/environment.sh/usr/bin/. ?
Do you have permissions?
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:24 PM
тАО09-27-2007 11:24 PM
Re: how to add variables into this file?.cshrc profile.
setenv NDMAPICFG=/home/user3/cdunix/ndm/cfg/cliapi/ndmapi.cfg
The .cshrc is the profile of the c-shell.
You will have to explain a more what mean with
how could i enable to use ". /home/user2/env/environment.sh" (.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:28 PM
тАО09-27-2007 11:28 PM
Re: how to add variables into this file?.cshrc profile.
The first answer is you need to adjust the permissions to be readable by the user, or change the owner of the .profile to the user.
The second answer is:
set path=(
the third answer is to change to csh, just type csh at the command prompt.
hope that helps,
Mike.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:34 PM
тАО09-27-2007 11:34 PM
Re: how to add variables into this file?.cshrc profile.
from 'man csh' setenv is without '='
set can work, too, but as said don't forget the '/'.
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:59 PM
тАО09-27-2007 11:59 PM
Re: how to add variables into this file?.cshrc profile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 06:31 PM
тАО09-28-2007 06:31 PM
Re: how to add variables into this file?.cshrc profile.
Right. Were you trying to source it in scummy C shell?:
% source home/user2/env/environment.sh
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 09:14 PM
тАО09-28-2007 09:14 PM
Re: how to add variables into this file?.cshrc profile.
look at the last characters, or are these to point at the dot.
". /home/user2/env/environment.sh" (.) <--
0 points please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 10:11 PM
тАО09-28-2007 10:11 PM
Re: how to add variables into this file?.cshrc profile.
". /home/user2/env/environment.sh" (.) <--
That was my assumption. Since the line before it looked like the error message:
. /home/user2/env/environment.sh/usr/bin/.: Permission denied.
Doing this in the scummy C shell would give that error since "." is not a script or a program.
$ csh
% . /usr/bin/echo
/home/MYID/bin/.: Permission denied.
So it is finding the first filename that is "." in $path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 10:20 PM
тАО09-28-2007 10:20 PM
Re: how to add variables into this file?.cshrc profile.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1165054
- Tags:
- broken URL link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2007 07:35 PM
тАО09-29-2007 07:35 PM
Re: how to add variables into this file?.cshrc profile.
I have to correct Mike's posting:
- The 'path' variable in (t)csh is an array (so it seems to be a local variable, it is handled specially)
- Setting arrays in such shells is done in such a way:
set var=(ele1 ele2 ele3)
So you'll have do substitute the colons by whitespace:
set path=($path /more/to/path)
mfG Peter