- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- setenv in csh
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
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
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
12-17-2002 02:59 AM
12-17-2002 02:59 AM
setenv in csh
Im trying to set an environment through a script.
for eg..a simple script with this line below:
------------------------
#!/bin/csh -f
setenv version /prg/1.0.1/
--------------------------
when i put the above 2 lines in a script and execute it. nothing happens it just returns back to the prompt with out changing any environment or giving any error msg.
Can somebody help me..or is there a better way of setting an environment through c script
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2002 03:01 AM
12-17-2002 03:01 AM
Re: setenv in csh
setenv version /prg/1.0.1/
in the command prompt it works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2002 03:03 AM
12-17-2002 03:03 AM
Re: setenv in csh
What you need is the dot command, whcih invokes the script /as if it were script source/
. script
is like #include in C-source files. Due to the fact that is executed in-line, the scope promotes to the current script, and will be visible after the call.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2002 03:05 AM
12-17-2002 03:05 AM
Re: setenv in csh
alias .=source
so the previous post should have read: what you need is the 'source'; command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2002 07:03 AM
12-17-2002 07:03 AM
Re: setenv in csh
env
source scriptname
env
see if that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2002 01:33 PM
12-18-2002 01:33 PM
Re: setenv in csh
.cshrc playe the same role as .profile in sh/ksh