Does not read .cshrc

Does not read .cshrc

Post by PeTe » Fri, 24 Apr 1998 04:00:00



Recently have installed (Upraded) to Solaris 2.5.1 (APR 97) from 2.3.  Among
other bugs I have dealt with and fixed, I am unable to get .cshrc to be read
at login... I have NOT changed the the file in any way since the upgrade.  I
have several aliases set up in the file and they do not work after login.  I
source the file, but no effect.  Yes - the default login shell is "C"
(csh)...

Thanx in advance for any ideas...  Remove the NOSPAM from my e-mail if you
wish to repspond through that...
Pete D.
--
Nobody goes there anymore; it's too crowded - Yogi Berra
--

 
 
 

Does not read .cshrc

Post by Shawn D. McPee » Fri, 24 Apr 1998 04:00:00



:> Recently have installed (Upraded) to Solaris 2.5.1 (APR 97) from 2.3.  Among
:> other bugs I have dealt with and fixed, I am unable to get .cshrc to be read
:> at login... I have NOT changed the the file in any way since the upgrade.  I
:> have several aliases set up in the file and they do not work after login.  I
:> source the file, but no effect.  Yes - the default login shell is "C"
:> (csh)...

Let me see if I understand this.

You have a .cshrc file with aliases defined in them.
After you "source .cshrc", you still don't get the aliases.

I would say there is something wrong with your .cshrc file.  I suppose
there is a possibility you could have  a very broken /bin/csh causing
you trouble, but I would simply expect you to have  some problem in
your .cshrc.  Try commenting out lines at a time until something works.

Shawn

--
..  he dominates the DECADENT SUBWAY SCENE.
                                -- Zippy the Pinhead

 
 
 

Does not read .cshrc

Post by Walter Davi » Fri, 24 Apr 1998 04:00:00


How are you defining your aliases?  Have you tried the 'alias' command
alone after logging in and/or sourcing your .cshrc to see if there are any
aliases at all?  I had some trouble with what you're describing and it
turned out to be just me giving the wrong syntax.  Example of my current
(correct) syntax:

alias lf ls -F

HTH

        -Walther


>Recently have installed (Upraded) to Solaris 2.5.1 (APR 97) from 2.3.  Among
>other bugs I have dealt with and fixed, I am unable to get .cshrc to be read
>at login... I have NOT changed the the file in any way since the upgrade.  I
>have several aliases set up in the file and they do not work after login.  I
>source the file, but no effect.  Yes - the default login shell is "C"
>(csh)...
>Thanx in advance for any ideas...  Remove the NOSPAM from my e-mail if you
>wish to repspond through that...
>Pete D.
>--
>Nobody goes there anymore; it's too crowded - Yogi Berra
>--

 
 
 

Does not read .cshrc

Post by PeTe » Sat, 25 Apr 1998 04:00:00


:How are you defining your aliases?  Have you tried the 'alias' command
:alone after logging in and/or sourcing your .cshrc to see if there are any
:aliases at all?  I had some trouble with what you're describing and it
:turned out to be just me giving the wrong syntax.  Example of my current
:(correct) syntax:
:
:alias lf ls -F
:
:HTH
:
: -Walther
Alias alone does NOT produce any aliases...
Yes, I can perform the alias on the command line as it appears in the .cshrc
file...
ex.  alias ll 'clear;ls -alF | more'  worked in the 2.3 world and works when
I put it on the command line..?

Thanx again Pete D.
:>Nobody goes there anymore; it's too crowded - Yogi Berra
:>--
:
:

 
 
 

Does not read .cshrc

Post by Norman Dresne » Sat, 25 Apr 1998 04:00:00




Quote:> Recently have installed (Upraded) to Solaris 2.5.1 (APR 97) from 2.3.
Among
> other bugs I have dealt with and fixed, I am unable to get .cshrc to be
read
> at login... I have NOT changed the the file in any way since the upgrade.
 I
> have several aliases set up in the file and they do not work after login.
 I
> source the file, but no effect.  Yes - the default login shell is "C"
> (csh)...

First, at the command line
        source .cshrc
if that doesn't work, fix it and try again.

Second, temporarily rename that .cshrc to something else, e.g. .cshrc.save
and try just an echo command in a new .cshrc file.  If that doesn't work,
look at the file permissions.  In some systems, .chsrc MUST be owned by you
and MUST be executable, i.e.
        chmod   +x      .cshrc

If you can get passed these two steps, you can rename the saved file to
cshrc and enjoy.

Norm D.

 
 
 

Does not read .cshrc

Post by Phil Edwar » Sat, 25 Apr 1998 04:00:00


[cc'd to original poster]

[Followups massively trimmed.]



+:> Recently have installed (Upraded) to Solaris 2.5.1 (APR 97) from 2.3.  Among
+:> other bugs I have dealt with and fixed, I am unable to get .cshrc to be read
+:> at login... I have NOT changed the the file in any way since the upgrade.  I
+:> have several aliases set up in the file and they do not work after login.  I
+:> source the file, but no effect.  Yes - the default login shell is "C"
[snip]
+ I would say there is something wrong with your .cshrc file.  I suppose
+ there is a possibility you could have  a very broken /bin/csh causing
+ you trouble,

Both.

One of my users had this same problem on our Solaris systems, both on 2.5.1
and 2.6.  Granted, he had over 200 lines of aliases, most of which were
completely pointless and involved gratuitous quoting.  But it turned out
that the major source of problems were lines like

        alias foo "/usr/bin/foobar.thing -blah"  # redundant comment

When Sun's crappy implementation of csh parsed that, it would occasionally
include the comment in the alias definition, especially if the alias
expansion had involved any serious variable expansions.

I recommended, among other things, that he change them all to

        # redundant comment on seperate line
        alias foo "/usr/bin/foobar.thing -blah"

and he said that did the trick.

Luck++;
/dev/phil

=> If you post a followup, PLEASE don't email a copy to me.  I read news
    often enough that replying to things twice is annoying.  But thanks.