03-05-2007
.profile not reading .kshrc
Can anyone tell me why .profile would not be reading my .kshrc file?
O/S is SCO 5.06? I've placed echo's before & after setting ENV and
nothing ... help?
Thanks!
Here's .profile
==================================================
:
# DoubleVision Pro's digiboard call during login...
[ -x /usr/lib/dv/digi_trigger ] && /usr/lib/dv/digi_trigger
# @(#) root.profile 88.2 99/12/21
#
# Copyright (C) 1989-1999 The Santa Cruz Operation, Inc.
# All Rights Reserved.
# The information in this file is provided for the exclusive use of
# the licensees of The Santa Cruz Operation, Inc. Such users have the
# right to use, modify, and incorporate this code into other products
# for purposes authorized by the license agreement provided they include
# this notice and the associated copyright notice with any such product.
# The information in this file is provided "AS IS" without warranty.
#
SHELL=/bin/ksh
HOME=/usr/space
PATH=$PATH:/etc:/tcb/bin
PFPRINTER=hp_accting
PFPROG=/u/appl
PFDATA=/u
PFDIR=/appl
export PFPRINTER PFPROG PFDATA PFDIR
# set terminal type
# eval `tset -m scoansi:${TERM:-scoansi} -m :\?${TERM:-scoansi} -e -r -s -Q`
export TERM PATH SHELL HOME
[ -x /bin/termtype ] && /bin/termtype
[ -x /bin/mesg ] && mesg n # if mesg is installed...
echo "$HOME/.kshrc"
if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then
ENV='${_ENVFILE[(_=1)+(_$-=0)-_${-%%*i*}]}'
_ENVFILE=/.kshrc
export ENV _ENVFILE
fi
uptime
echo " "
dfspace
echo " "
cat /etc/motd
echo
==========================================================
And here's the .kshrc file
#!/bin/ksh
# @(#) root.kshrc 88.2 99/12/21
#
# Copyright (C) 1989-1999 The Santa Cruz Operation, Inc.
# All Rights Reserved.
export SHELL=/bin/ksh
# set vi mode (Arrow fnkys not supported in this mode) when ksh
# interactive and VISUAL|EDITOR contain "vi" or vi mode already set.
# Setup support for (ansi) arrow fnkeys (and emacs mode) when ksh interactive
# and VISUAL|EDITOR not contain vi and vi mode not set or emacs mode is.
# Don't do any of this if $_noAUTOFNKEYS is set to anything.
if [[ -z "$_noAUTOFNKEYS" ]] ; then
em=${VISUAL:-EDITOR}
[[ -o vi ]] && em=vi
[[ -o emacs ]] && em=emacs
[[ -o gmacs ]] && em=off
em=${em:-"emacs"}
# echo "$-:${em}"
case "$-:${em}" in
*i*: off) ;;
*i*:*vi* )
# echo "** ksh -o vi (interactive)"
set -o vi
;;
*i* )
# echo "** ksh -o emacs (interactive)"
set -o emacs
# Ansi (console/scoterm/xterm) Fnkey sequences
alias __A='^P' # UpArr
alias __B='^N' # DwnArr
alias __C='^F' # RghtArr
alias __D='^B' # LftArr
alias __H='^A' # Home
alias __F='^E' # End
_TAB_Complete=1 # enable Tab completion as well as Esc,Esc
;;
esac
fi
alias mc='cd `mc -caP`'
alias mcedit='mcedit -ca'
export PS1="SCO_SV:\$PWD # "
Last edited by gseyforth; 03-05-2007 at 03:46 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix.
please explain..
thanks (4 Replies)
Discussion started by: yls177
4 Replies
2. SCO
what is the difference between these two lines, if we use it in korn shell script:
.profile
.~/.profile (3 Replies)
Discussion started by: maneesh mehta
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I m new to Solaris CDE...earlier i was using Windows.
Here is my problem..
i know that whatever the initial settings we need to execute,we can place them in .profile file.
in my home dir (/home/venki),i have following files for that.
.profile
.profile.user
.kshrc
.kshrc.user
... (2 Replies)
Discussion started by: Venky
2 Replies
4. Shell Programming and Scripting
An odd problem using .kshrc, if I run with this in my home login directory it works fine other than if I use 'man', where each word of the manual entry is on a seperate line ?. I'm using AIX 5.3 (it worked fine on 5.2). Anyone seen this before ? (3 Replies)
Discussion started by: gefa
3 Replies
5. Programming
hi
iam reading data from web page using request socket and curl socket.
now my problem is some the web page containg data as a image so how can i read the data from a image.
thank,inadvance.
sree (3 Replies)
Discussion started by: phani_sree
3 Replies
6. Shell Programming and Scripting
Hi,
My login shell is c shell
I have a line in .cshrc like
setenv a 1000
I have a line in .profile like
ENV=$HOME/.kshrc
export ENV
and in my .kshrc
a=10
export a
I wrote one korn script
#!/bin/ksh
echo $a (3 Replies)
Discussion started by: shahnazurs
3 Replies
7. UNIX for Dummies Questions & Answers
What is the difference between /etc/profile and .profile? (5 Replies)
Discussion started by: gehlnar
5 Replies
8. Shell Programming and Scripting
Hi,
I am facing two problems in my environment. Anyone can help on this?
Thanks in advance.
Problem 1
---------
When i login into my new unix system, only the .profile is executing.
.kshrc is not executing. But my default shell is .ksh
Any setup to be changed ?
Problem 2... (7 Replies)
Discussion started by: senthil_is
7 Replies
9. Infrastructure Monitoring
Hello
I really wonder what's trap in etc/profile and in each user .profile.
I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing.
I want to know ...
1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies
10. UNIX for Beginners Questions & Answers
So Yesterday I switched from Solus Linux to Fedora Linux 30, but I forgot to backup some of my dotfiles including kshrc. I am fairly new to Korn shell and do not know it well, but through memory I was able to at least get this. I did use code from several different source to recreate it. The only... (13 Replies)
Discussion started by: zoomer
13 Replies