Sponsored Content
Top Forums UNIX for Dummies Questions & Answers setting global variable for all users Post 26167 by peter.herlihy on Tuesday 13th of August 2002 02:56:17 AM
Old 08-13-2002
I see you haven't heard back - and there may well (in fact probably is) a 'proper' way to do this.

however if this is urgent....it may be possible to use a simple find -exec to locate all .login or .profile files in the filesystem and append the data.

Not ideal I guess, but it would work if you're root......
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Global PATH setting

I am using Solaris 8 and I want to change the PATH setting for all users. I have edited /etc/profile, but when I log in and check the PATH variable, it hasn't changed. Am I missing something? (5 Replies)
Discussion started by: jxh
5 Replies

2. UNIX for Dummies Questions & Answers

Is there such thing as Global Env Variable for all users?

Hello im using SunOS and its great , I know I can setenv global environment variable per user but my question is can I setenv global environment variable in more higher level ( maybe some kind of root user or something) so that every users will see the same value of this global env (3 Replies)
Discussion started by: umen
3 Replies

3. UNIX for Advanced & Expert Users

Managing Users in a Global Environment

Hello, I am interested in your strategy for handling engineers Unix accounts when the engineers must log in to resources in a variety of locals in a global environment. The engineers home directory and normal environment is local to where the engineer is sitting. When they log in to a remote... (0 Replies)
Discussion started by: Randal
0 Replies

4. UNIX for Dummies Questions & Answers

setting a global variable in script

Hi All, I know to set global variable i can use export .. But take the situation like below .. I want to set a variable in one script and access that in second script i have done like this .. It is not working one.sh #!/usr/bin/ksh echo $RISSHI export RISSHI=1 two.sh... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

5. Shell Programming and Scripting

Global variable

I have written a shell scritp in which i am using a variable which is declared before a while loop and i am updaitng the variable in while loop and want to use its updated value outside the loop. I am not able to do so, b'coz the scope of the variable is limited to the while loop only and when i am... (5 Replies)
Discussion started by: deepanshu
5 Replies

6. UNIX for Advanced & Expert Users

Setting global variables with BASH/Linux

I am using functions in a script and for some strange reason the EXPORT command doesnt seem to be making my variables global. Anyone got any ideas? I am using one function to pass some output top another using the pipe command, eg Function 1 | Function 2 Function 2 reads the value... (3 Replies)
Discussion started by: gregf
3 Replies

7. Shell Programming and Scripting

Help with Global Variable

Hi Guyz, I have a requirement like, i have to run a script every hour to count the number of errors encountered. At the end of the day, i need to send them the total number of errors, that have ocurred the entire day. For eg. if 10 errors occurred for starting 1 hr, 5 for next 1 hr, so on.... (1 Reply)
Discussion started by: DTechBuddy
1 Replies

8. Shell Programming and Scripting

Setting environmental variable for all the users in the box

Hi, I have Sun solaris x64 box in which i need to set a Environment variable for all the users in the box. This Environment varible is used by the application on the box. Could any one please help me in setting the Environment variable. Thanks, Firestar (6 Replies)
Discussion started by: firestar
6 Replies

9. UNIX for Advanced & Expert Users

Setting a permanent global variable in unix accessible from any script

Is there anyway in which i can set a permanent global variable in unix, which when initialised with a value and modified during any shell script, would retain its value even if i logout and login I dont know whether i am being able to express my need clearly but basically what i want is a... (3 Replies)
Discussion started by: arindamlive
3 Replies

10. Shell Programming and Scripting

Global Variable

Hi, I have created a variable say today at the begin having 123 as its value and inside a for loop it gets resolved to some value say 150 in its first iteration. How can I use this value 150 ( 1st iteration's ) outside the scope of for loop ?. In the same way I wanted to use all iteration's... (1 Reply)
Discussion started by: penqueen
1 Replies
profile(4)							   File Formats 							profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 06:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy