set is used to display the contents of your environment. Issue it and you will get a list of variable=value lines. There are several special variables among these, but it will show you all variables defined in this shell so far.
export is used on variables to have them inherited by processes spawned from this environment.
To explain this in a little more detail: you can start any program from within the shell - even another invokation of this shell. When you declare a variable within a certain shell environment then the program(s) started from this environment does not know about this variable automatically. If the variable is "export"ed it will be known, though.
Hi!
How-to get the environment variables in GNU.
getenv() only fetches the ones that you can find under export (not the ones under declare)...
best regars .David (2 Replies)
hi,
1). i would like to know what is meant by environment variables?
2). is the number of envi variables is a constant number for unix systems?
3). how to see the list of envi variables (and the values of the envi variables)in a single command?
4). if this questions were already asked... (3 Replies)
hi,
I want to create a new EV(Environment Variable) through a c program and I done this thing through setenv() method. But the newly created EV is not permanent, i.e. when I exit from the program the EV also no longer lives. But I want to make it a permanent EV for the current user. Actually I... (6 Replies)
I have read tons of posts about how you can't set persisting environment variable in a child script of a shell and have it persist. The only way is to source a file as
% . <scriptname>
I am finding that true... but I know there is a way around it. I just don't know how. I worked for 6... (5 Replies)
1. The problem statement:
What is the mesg value set for your environment? If it is on, how would you turn off your current
session? How would you set it permanently?
3. The attempts at a solution :
Read Unix The textbook.
3rd chapter has many things like environment variables and... (5 Replies)
Hi All,
I need to understand following three environment variables and their usages in HP Unix.
_M_ARENA_OPTS
_M_CACHE_OPTS
PTHREAD_SCOPE_SYSTEM
How does these environment variables influence multi threaded applciation and how do we decide the value of these variables? Is there... (0 Replies)
Discussion started by: angshuman
0 Replies
LEARN ABOUT HPUX
groups
groups(1) General Commands Manual groups(1)NAME
groups - show group memberships
SYNOPSIS
[user]
DESCRIPTION
shows the groups to which the caller or the optionally specified user belong. If invoked with no arguments, prints the current access list
returned by (see getgroups(2)).
Each user belongs to a group specified in the password file and possibly to other groups as specified in the files and A user is granted
the permissions of those groups specified in and at login time. The permissions of the groups specified in are normally available only
with the use of (see newgrp(1)). If a user name is specified with no options, prints the union of all these groups.
The and options limit the printed list to those groups specified in and respectively. If a user name is not specified with any of these
options, is called to determine the default user name (see cuserid(3S)).
The printed list of groups is sorted in ascending collation order (see Environment Variables below).
EXTERNAL INFLUENCES
Environment Variables
determines the order in which the output is sorted.
If is not specified in the environment or is set to the empty string, the value of is used as a default. If is not specified or is set to
the empty string, a default of ``C'' (see lang(5)) is used instead of If any internationalization variable contains an invalid setting,
behaves as if all internationalization variables are set to ``C'' (see environ(5)).
EXAMPLES
Check file and display all groups to which user belongs:
AUTHOR
was developed by the University of California, Berkeley.
FILES SEE ALSO id(1), newgrp(1), getgroups(2), initgroups(3C), cuserid(3S), group(4).
groups(1)