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.
Last edited by pludi; 09-02-2010 at 03:55 AM..
Reason: code tags, please...
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)
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)
hi,
I have one environment variable like path in my system.But in my program i need to change that path .suppose it has a value "config" now i need to chage it as "config1" or something else.i need to use that variable for complete project.It means at first it will use the old path but after... (4 Replies)
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)
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)
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)
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)
I've searched Google and now this forum. Best guess is my search fu is not good (and it probably isn't). The Google search did bring me here.
Background
I have a number of Korn Shell scripts who all use one of 3 values for an environment variable used in the backup system.
On occasion one or... (8 Replies)
Hi,
I an having some environment variables exported and the variable name is present in the file. But its not resolving with following commands. Can someone throw some light.
db $ grep -v "^#" TD_FWK_NUCLEUS.dbc | grep -v "^$" | xargs -i echo {}
wb_bin: ${TD_FWK_NUCLEUS_DBC_WB_BIN_TAG}
I... (3 Replies)
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 POSIX
export
EXPORT(P) POSIX Programmer's Manual EXPORT(P)
NAME
export - set the export attribute for variables
SYNOPSIS
export name[=word]...
export -p
DESCRIPTION
The shell shall give the export attribute to the variables corresponding to the specified names, which shall cause them to be in the envi-
ronment of subsequently executed commands. If the name of a variable is followed by = word, then the value of that variable shall be set to
word.
The export special built-in shall support the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
When -p is specified, export shall write to the standard output the names and values of all exported variables, in the following format:
"export %s=%s
", <name>, <value>
if name is set, and:
"export %s
", <name>
if name is unset.
The shell shall format the output, including the proper use of quoting, so that it is suitable for reinput to the shell as commands that
achieve the same exporting results, except:
1. Read-only variables with values cannot be reset.
2. Variables that were unset at the time they were output need not be reset to the unset state if a value is assigned to the variable
between the time the state was saved and the time at which the saved output is reinput to the shell.
When no arguments are given, the results are unspecified.
OPTIONS
See the DESCRIPTION.
OPERANDS
See the DESCRIPTION.
STDIN
Not used.
INPUT FILES
None.
ENVIRONMENT VARIABLES
None.
ASYNCHRONOUS EVENTS
Default.
STDOUT
See the DESCRIPTION.
STDERR
The standard error shall be used only for diagnostic messages.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
Zero.
CONSEQUENCES OF ERRORS
Default.
The following sections are informative.
APPLICATION USAGE
None.
EXAMPLES
Export PWD and HOME variables:
export PWD HOME
Set and export the PATH variable:
export PATH=/local/bin:$PATH
Save and restore all exported variables:
export -p > temp-fileunset a lot of variables... processing. temp-file
RATIONALE
Some historical shells use the no-argument case as the functional equivalent of what is required here with -p. This feature was left
unspecified because it is not historical practice in all shells, and some scripts may rely on the now-unspecified results on their imple-
mentations. Attempts to specify the -p output as the default case were unsuccessful in achieving consensus. The -p option was added to
allow portable access to the values that can be saved and then later restored using; for example, a dot script.
FUTURE DIRECTIONS
None.
SEE ALSO
Special Built-In Utilities
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 EXPORT(P)