Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Korn Shell login problems
@ 1997-05-15  4:00 Russell F Glissmann
  1997-05-15  4:00 ` Gerald A. Feldman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Russell F Glissmann @ 1997-05-15  4:00 UTC (permalink / raw)



Hello all;
I recently changed over to using the Korn shell.  When I login I keep gettin
indicating an error message indicating a problem in my .profile script. 
 For me the script looks to be okay.  I imported the .profile from a 
Sun system, and the server I'm running on now is a Dec Alpha running 
OSF/1 v 3.0.  Here is the script itself: @(#)local.profile setup
#
if ["`basename ${SHELL}`"=="ksh"]; export ENV=${HOME}./kshrc fi
#if [-a /etc/kshrc]; then ./etc/kshrc fi
if [-a "${ENV}"]; then .${ENV} fi
fi 2>/dev/null
stty istrip
stty erase ^?
export PATH=$HOME/bin:/usr/ucb:/etc:/bin:/sbin:/usr/bin:/usr/sbin:
/usr/etc:/usr/bin/X11:/usr/local/etc:/usr/local/bin:/usr/new:/usr/games:.
export PATH
ENV=$HOME/.kshrc;export ENV
SHELL=/usr/bin/ksh;export SHELL
EDITOR=/USR/BIN/VI;export EDITOR

Here is the error message I get: .profile[3]: syntax error: `if' unmatched
If someone could look and tell what is not correct I would be gratefull.  
Thanks
Russell Glissmann
rfglissm@ouray.cudenver.edu
rglissma@datastor.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Korn Shell login problems
  1997-05-15  4:00 Korn Shell login problems Russell F Glissmann
@ 1997-05-15  4:00 ` Gerald A. Feldman
  1997-05-16  4:00 ` Vincent
  1997-05-19  4:00 ` Bob Vickers
  2 siblings, 0 replies; 4+ messages in thread
From: Gerald A. Feldman @ 1997-05-15  4:00 UTC (permalink / raw)
  To: Russell F Glissmann


Russell F Glissmann wrote:

> Hello all;
> I recently changed over to using the Korn shell.  When I login I keep
> gettin
> indicating an error message indicating a problem in my .profile
> script.
>  For me the script looks to be okay.  I imported the .profile from a
> Sun system, and the server I'm running on now is a Dec Alpha running
> OSF/1 v 3.0.  Here is the script itself: @(#)local.profile setup
> #
> if ["`basename ${SHELL}`"=="ksh"]; export ENV=${HOME}./kshrc fi
> #if [-a /etc/kshrc]; then ./etc/kshrc fi
> if [-a "${ENV}"]; then .${ENV} fi
> fi 2>/dev/null
> stty istrip
> stty erase ^?
> export PATH=$HOME/bin:/usr/ucb:/etc:/bin:/sbin:/usr/bin:/usr/sbin:
> /usr/etc:/usr/bin/X11:/usr/local/etc:/usr/local/bin:/usr/new:/usr/
> ames:.
> export PATH
> ENV=$HOME/.kshrc;export ENV
> SHELL=/usr/bin/ksh;export SHELL
> EDITOR=/USR/BIN/VI;export EDITOR
>
> Here is the error message I get: .profile[3]: syntax error: `if'
> unmatched
> If someone could look and tell what is not correct I would be
> gratefull.
>
The line below is your problem.
fi 2>/dev/null

--
 Jerry Feldman <gaf@mediaone.net>
 Boston Computer Solutions and Consulting
 http://gaf.ne.mediaone.net/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Korn Shell login problems
  1997-05-15  4:00 Korn Shell login problems Russell F Glissmann
  1997-05-15  4:00 ` Gerald A. Feldman
@ 1997-05-16  4:00 ` Vincent
  1997-05-19  4:00 ` Bob Vickers
  2 siblings, 0 replies; 4+ messages in thread
From: Vincent @ 1997-05-16  4:00 UTC (permalink / raw)



Hi Russel,

Here are the necessary corrections to be done. I haven't tested them and I
may have made some mistakes ... 
 Russell F Glissmann wrote in article <5lflbt$92e@carbon.cudenver.edu>...
>Hello all;
>I recently changed over to using the Korn shell.  When I login I keep
gettin
>indicating an error message indicating a problem in my .profile script.
> For me the script looks to be okay.  I imported the .profile from a
>Sun system, and the server I'm running on now is a Dec Alpha running
>OSF/1 v 3.0.  Here is the script itself: @(#)local.profile setup
>#
>if ["`basename ${SHELL}`"=="ksh"]; export ENV=${HOME}./kshrc fi

if [[ `basename $SHELL` = "ksh" ]]; then


export ENV=$HOME/.kshrc
fi

>#if [-a /etc/kshrc]; then ./etc/kshrc fi
>if [-a "${ENV}"]; then .${ENV} fi
>fi 2>/dev/null


if [[ -f $ENV ]]; then
. $ENV 2> /dev/null
fi

>stty istrip
>stty erase ^?
>export PATH=$HOME/bin:/usr/ucb:/etc:/bin:/sbin:/usr/bin:/usr/sbin:
>/usr/etc:/usr/bin/X11:/usr/local/etc:/usr/local/bin:/usr/new:/usr/games:.
>export PATH
>ENV=$HOME/.kshrc;export ENV
>SHELL=/usr/bin/ksh;export SHELL
>EDITOR=/USR/BIN/VI;export EDITOR
>
>Here is the error message I get: .profile[3]: syntax error: `if'
unmatched
>If someone could look and tell what is not correct I would be gratefull. 
>Thanks
>Russell Glissmann
>rfglissm@ouray.cudenver.edu
>rglissma@datastor.com
> 

that should work...


Bye.

Vincent
e-mail: pcharlie@hk.super.net






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Korn Shell login problems
  1997-05-15  4:00 Korn Shell login problems Russell F Glissmann
  1997-05-15  4:00 ` Gerald A. Feldman
  1997-05-16  4:00 ` Vincent
@ 1997-05-19  4:00 ` Bob Vickers
  2 siblings, 0 replies; 4+ messages in thread
From: Bob Vickers @ 1997-05-19  4:00 UTC (permalink / raw)
  To: Russell F Glissmann


Russell F Glissmann wrote:
> 
> Hello all;
> I recently changed over to using the Korn shell.  When I login I keep gettin
> indicating an error message indicating a problem in my .profile script.
>  For me the script looks to be okay.  I imported the .profile from a
> Sun system, and the server I'm running on now is a Dec Alpha running
> OSF/1 v 3.0.  Here is the script itself: @(#)local.profile setup
> #
> if ["`basename ${SHELL}`"=="ksh"]; export ENV=${HOME}./kshrc fi

There are at least 5 errors in that line, and more in the rest of the
script. You need to test it carefully both on the Sun system and the OSF
one.

if [ "`basename ${SHELL}`" = "ksh" ]; then export ENV=${HOME}./kshrc ;
fi

will sort out line 3. Note the addition of white space, the replacement
of == by =, the addition of 'then' and a semi-colon before the 'fi'.

Bob
-- 
======================================================================
Bob Vickers			R.Vickers@rhbnc.ac.uk
Dept of Computer Science, Royal Holloway College, University of London
WWW:	http://www.dcs.rhbnc.ac.uk/%7Ebobv/
Phone:	+44 1784 443691



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-05-19  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-15  4:00 Korn Shell login problems Russell F Glissmann
1997-05-15  4:00 ` Gerald A. Feldman
1997-05-16  4:00 ` Vincent
1997-05-19  4:00 ` Bob Vickers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox