03-18-2006
to retrieve the old variable from the env
use getenv
and to set new value to env variable as you have said it is
setenv
if you still find some issues, the post the code and how you had tried that?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
How does the PATH and MANPATH environment variable get set?
I want to add "/opt/SUNWspro/bin" to the search path for all the users. Where can I access this variable.
I know in my home directory, depend on which shell I use, there are files such as .profile and .cshrc which I can edit to... (3 Replies)
Discussion started by: vtran4270
3 Replies
2. UNIX for Advanced & Expert Users
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
3. Shell Programming and Scripting
hi all
i have joined new to the group.
i have set an variable in my bashrc file.
.bashrc
PROGHOME=/home/braf/braf/prog
export PROGHOME
but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path.
in my script... (8 Replies)
Discussion started by: krithika
8 Replies
4. Linux
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
5. Solaris
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
6. Shell Programming and Scripting
Do not know how to do this, any help would be appreciated:
I have a file that comes in called xxxx.txt. I have a script that does some messing around with the file.
The file needs to go out as PAB108XXXX.csv
The four x's above will be a number that changes everytime the script is ran e.g.... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies
7. UNIX for Dummies Questions & Answers
hi,
i am new to perl:
os : Linux
i wrote simple perl script to select from table i am getting this error and how to set ORACLE_HOME environment variable :
script:
#!usr/bin/perl
use DBI;
use Mail::Sendmail;
#use Date::Calc;
use MIME::QuotedPrint;
use HTML::Entities;
use POSIX... (2 Replies)
Discussion started by: prakash.gr
2 Replies
8. Shell Programming and Scripting
Hi,
i have the following env variable. currently i am exporting variable in the same script file. but i need this is in a text file and the scripts need to export this variable from the text file.
can you please suggest me. is it possible.
export... (6 Replies)
Discussion started by: rsivasan
6 Replies
9. Shell Programming and Scripting
Hi,
I have two scripts that use the same variable. Say suppose I export that variable in script 1 and try to use it in script 2 where I have declared it locally, what will be the effective value of the variable? Will it take the exported value or the locally declared?
example:
Script1... (4 Replies)
Discussion started by: PraveenSikamani
4 Replies
10. Solaris
Hi all,
In Solaris 10, is there a way to search for the sessions that have a certain environment variable set? (8 Replies)
Discussion started by: ejianu
8 Replies
LEARN ABOUT HPUX
catclose
catopen(3C) catopen(3C)
NAME
catopen(), catclose() - open and close a message catalog for reading
SYNOPSIS
DESCRIPTION
The function opens a message catalog and returns a catalog descriptor. The specifies the name of the message catalog being opened. A con-
taining a slash specifies a path name for the message catalog. Otherwise, the environment variable is used (see environ(5)). If specifies
more than one path, returns the catalog descriptor for the first path on which it is able to successfully open the specified message cata-
log. If does not exist in the environment, or if a message catalog cannot be opened for any path, uses a system-wide default path. The
default is affected by if the value of is If the value of is zero, the default is affected by the environment variable See environ(5) for
details.
If is invoked from or programs with owner root, the environment variable is not directly used to locate message catalogs. Instead, the
paths which are available both in the configuration file and environment variable are considered to locate message catalogs. See
nlspath(4) for details.
Example: If the environment variable is set to:
and the configuration file has an entry:
only path is considered for locating catalog files. This feature is provided only for backward compatibility for those or root programs
which are depending on the environment variable. All new or root programs should not depend on the environment variable and should only
use absolute path names.
A message catalog descriptor remains valid in a process until the process closes it or until a successful call to one of the functions. A
change in the setting of the category may invalidate existing open catalogs.
A file descriptor is used to implement the message catalog descriptor and the close-on-exec flag is set for the message catalog descriptor
(see fcntl(2)).
If is zero, the environment variable is used to locate the catalog. If is the category is used to locate the message catalog only if a
successful call to has been made prior to the call to The result of setting to any other value is undefined.
The function closes the message catalog a message catalog descriptor returned from an earlier successful call to
RETURN VALUE
Upon success, returns a message catalog descriptor. Otherwise, returns a value of (nl_catd)-1 and sets to indicate the error.
Upon success, returns zero. Otherwise, returns -1 and sets to indicate the error.
ERRORS
fails without opening a message catalog and sets for the last path attempted under any of the following conditions:
A component of the path prefix denies search permission, or
read permission is denied for the named file.
The maximum number of file descriptors allowed are currently open.
The length of the specified path name exceeds
bytes, or the length of a component of the path name exceeds bytes while is in effect.
The system file table is full.
The named catalog does not exist or the path is null.
A component of the path prefix is not a directory.
can be used to provide default messages when called following a failed (see catgets(3C)). returns its parameter if it is passed an invalid
catalog descriptor.
fails if the following is true:
is not a valid open message catalog descriptor.
WARNINGS
When using does not provide a default value for
AUTHOR
and were developed by HP.
FILES
Include file containing native language types.
Message catalog default path for core HP-UX products only.
SEE ALSO
fcntl(2), catgets(3C), setlocale(3C), nlspath(4), environ(5), thread_safety(5).
STANDARDS CONFORMANCE
catopen(3C)