![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go here. All UNIX and Linux Newbies Welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Edit value in File | sewood | Shell Programming and Scripting | 1 | 03-17-2008 11:11 PM |
| Where can I read about the difference between "..profile" and ".profile" | zorrokan | UNIX for Dummies Questions & Answers | 2 | 09-04-2007 10:35 PM |
| Difference between .profile and .~/.profile | maneesh mehta | SCO | 3 | 12-14-2005 01:35 AM |
| changed .profile but didnt ./.profile, yet reflected changes | yls177 | UNIX for Dummies Questions & Answers | 4 | 12-05-2002 08:21 AM |
| Edit txt? | <Therapy> | UNIX for Dummies Questions & Answers | 2 | 03-20-2002 03:47 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Edit .profile
I just started to use Solaris and am looking to see if anyone has any good documents for begginers on using Solaris, specifically, how to edit .profile. I know this question may be a little vague...
I have done numerous searches on google with no results! Thanks for your time. Dasnutz |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Here is a good example from ksh .profile for Solaris
################################################################################ # Name: .profile # Description: This is root's profile. Login shells source this after # /etc/profile. It is used to define root's environment. # All non-environment configuration will be done in the # shell specific resource file. # Special: ENV= is specific to ksh to indicate the name of it's # resource file. Bourne shell ignores this. # Author: Ryan T. Tennant # Version: 0.1 # Date: 2000/08/09 # ################################################################################ default_paths() { PATH="/usr/bin:/usr/sbin:/sbin:/usr/local/bin" MANPATH="/usr/man:/usr/local/man" LD_LIBRARY_PATH="/usr/lib:/usr/local/lib" OS="`/usr/bin/uname -s | /usr/bin/grep -ci sun`" } check_openwindows() { if [ -d /usr/openwin ]; then PATH="$PATH:/usr/openwin/bin:/usr/dt/bin" MANPATH="$MANPATH:/usr/openwin/man:/usr/dt/man" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/openwin/lib:/usr/dt/lib" fi } check_build_environment() { if [ -d /usr/ccs ]; then PATH="$PATH:/usr/ccs/bin" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/ccs/lib" fi } check_online_disk_suite() { if [ -d /usr/opt/SUNWmd ]; then PATH="$PATH:/usr/opt/SUNWmd/sbin" MANPATH="$MANPATH:/usr/opt/SUNWmd/man" fi } check_veritas_volume_manager() { # Version 2.x if [ -x /opt/VRTSvxva/bin/vxva ]; then PATH="$PATH:/opt/VRTSvxva/bin" MANPATH="$MANPATH:/opt/VRTSvxva/man" fi # Version 3.x if [ -x /opt/VRTSvmsa/bin/vmsa ]; then PATH="$PATH:/opt/VRTSvmsa/bin" MANPATH="$MANPATH:/opt/VRTSvxvm/man:/opt/VRTSvmsa/man" fi } check_sun_ent_volume_manager() { if [ -d /opt/SUNWvxva ]; then PATH="$PATH:/opt/SUNWvxva/bin" MANPATH="$MANPATH:/opt/SUNWvxvm/man:/opt/SUNWvxva/man" fi } check_naviscore() { if [ -d /opt/CascadeView ]; then . /opt/CascadeView/etc/cvdb.cfg . /opt/CascadeView/etc/cascadeview.cfg . /opt/sybase/.sybenv PATH="$PATH:/opt/OV/bin" XUSERFILESEARCHPATH="/opt/CascadeView/app-defaults/%N:$XUSERFILESEARCHPATH" export XUSERFILESEARCHPATH fi } check_networker() { if [ -d /usr/bin/nsr ]; then PATH="$PATH:/usr/bin/nsr:/usr/sbin/nsr" fi } check_cluster() { if [ -d /opt/SUNWcluster ]; then PATH="$PATH:/opt/SUNWcluster/bin" MANPATH="$MANPATH:/opt/SUNWcluster/man" fi } generate_paths() { default_paths check_openwindows check_build_environment check_online_disk_suite check_veritas_volume_manager check_sun_ent_volume_manager check_naviscore check_networker check_cluster } set_options() { case "$1" in *ksh) EDITOR="vi" ENV=".kshrc" HOSTNAME=`/usr/bin/uname -n | /usr/bin/cut -d. -f1` PAGER="/usr/bin/more" if [ $OS -gt 0 ]; then USER=`/usr/xpg4/bin/id -un` else USER=`id -un` fi ;; *sh) EDITOR="vi" HOSTNAME=`/usr/bin/uname -n | /usr/bin/cut -d. -f1` PAGER="/usr/bin/more" cd() { chdir $* set_prompt `basename $0` } if [ $OS -gt 0 ]; then USER=`/usr/xpg4/bin/id -un` else USER=`id -un` fi ;; esac } set_prompt() { case "$1" in -ksh) PS1='[$USER@$HOSTNAME]:$PWD # ' ;; -sh) PWD=`pwd` PS1="[$USER@$HOSTNAME]:$PWD # " ;; esac } export_environment() { export ENV PAGER HOSTNAME LD_LIBRARY_PATH MANPATH PAGER PATH PS1 } # begin environment generate_paths set_options "$0" set_prompt "$0" export_environment # proceed to $ENV for ksh resources Keep Ryan's name in it - he did write it afterall. |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|