Professional Web Applications Themes

.cshrc - FreeBSD

This is the shell config file right ? I created a new user and put a .cshrc in his home directory but nothing happens ? FX-53# pw user show gert gert:*:1001:0::0:0:gert:/usr/home/gert:/bin/sh FX-53# pwd /usr/home/gert FX-53# ls -all total 609272 drwxr-xr-x 3 gert wheel 512 Mar 26 00:18 . drwxr-xr-- 3 root wheel 512 Mar 19 22:44 .. -rw-r--r-- 1 gert wheel 802 Mar 25 13:12 .cshrc...

  1. #1

    Default .cshrc

    This is the shell config file right ?
    I created a new user and put a .cshrc in his home directory but
    nothing happens ?

    FX-53# pw user show gert
    gert:*:1001:0::0:0:gert:/usr/home/gert:/bin/sh

    FX-53# pwd
    /usr/home/gert

    FX-53# ls -all
    total 609272
    drwxr-xr-x 3 gert wheel 512 Mar 26 00:18 .
    drwxr-xr-- 3 root wheel 512 Mar 19 22:44 ..
    -rw-r--r-- 1 gert wheel 802 Mar 25 13:12 .cshrc
    Gert Guest

  2. #2

    Default Re: .cshrc

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2005-03-25, Gert Cuykens scribbled these
    curious markings: 
    ^^^^^^^
    The user isn't using csh, so thus their shell won't read (and probably
    isn't able to read) the .cshrc file which you've specified.

    Best Regards,
    Christopher Nehren
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCRKHuk/lo7zvzJioRArGAAJkBFLEM2T2UiAQx6edfuXqJZbvg6gCgqczc
    s0TKZAKc5WfuTfd6TyIgOVM=
    =9A5o
    -----END PGP SIGNATURE-----

    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.

    Christopher Guest

  3. #3

    Default Re: .cshrc

    On Sat, Mar 26, 2005 at 12:32:59AM +0100, Gert Cuykens wrote: 

    ..cshrc is *a* shell config file. To be more precise it is the file
    that csh/tcsh (usually) reads in when started. (For details on exactly
    what files is read at startup by this shell read the csh(1) manpage.)

    Other shells read other files. (sh looks at .profile, zsh uses
    zshenv/zlogin/zshrc, etc.) Read the manpage for each shell to find out
    all the messy details.

     

    Why should anything happen? What did you expect to happen?

     

    --
    <Insert your favourite quote here.>
    Erik Trulsson
    uu.se
    Erik Guest

  4. #4

    Default Re: .cshrc

    > > I created a new user and put a .cshrc in his home directory but 
    >
    > Why should anything happen? What did you expect to happen?[/ref]

    This :)

    FX-53# cat .cshrc
    # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
    #
    # .cshrc - csh resource script, read at beginning of execution by each shell
    #
    # see also csh(1), environ(7).
    #

    alias h history 25
    alias j jobs -l
    alias la ls -a
    alias lf ls -FA
    alias ll ls -lA

    # A righteous umask
    umask 22

    set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
    /usr/local/bin /usr/X11R6/bin $HOME/bin)

    setenv EDITOR joe
    setenv PAGER more
    setenv BLOCKSIZE K

    if ($?prompt) then
    # An interactive shell -- set some stuff up
    set prompt = "`/bin/hostname -s`# "
    set filec
    set history = 100
    set savehist = 100
    set mail = (/var/mail/$USER)
    if ( $?tcsh ) then
    bindkey "^W" backward-delete-word
    bindkey -k up history-search-backward
    bindkey -k down history-search-forward
    endif
    endif
    FX-53#

    So the question is why does root uses csh shell and the a user a sh
    shell. What brings me to the following question , What is the best
    shell to use :)
    Gert Guest

  5. #5

    Default Re: .cshrc

    Gert Cuykens wrote: 
    >>
    >>Why should anything happen? What did you expect to happen?[/ref]
    >
    >
    > This :)
    >
    > FX-53# cat .cshrc
    > # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
    > #
    > # .cshrc - csh resource script, read at beginning of execution by each shell
    > #
    > # see also csh(1), environ(7).
    > #
    >
    > alias h history 25
    > alias j jobs -l
    > alias la ls -a
    > alias lf ls -FA
    > alias ll ls -lA
    >
    > # A righteous umask
    > umask 22
    >
    > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
    > /usr/local/bin /usr/X11R6/bin $HOME/bin)
    >
    > setenv EDITOR joe
    > setenv PAGER more
    > setenv BLOCKSIZE K
    >
    > if ($?prompt) then
    > # An interactive shell -- set some stuff up
    > set prompt = "`/bin/hostname -s`# "
    > set filec
    > set history = 100
    > set savehist = 100
    > set mail = (/var/mail/$USER)
    > if ( $?tcsh ) then
    > bindkey "^W" backward-delete-word
    > bindkey -k up history-search-backward
    > bindkey -k down history-search-forward
    > endif
    > endif
    > FX-53#
    >
    > So the question is why does root uses csh shell and the a user a sh
    > shell. What brings me to the following question , What is the best
    > shell to use :)[/ref]


    Useing vipw (as root) change the users shell from:

    /bin/sh
    - to -
    /bin/csh

    That's all

    --
    Best regards,
    Chris

    Performance is directly affected by the perversity of
    inanimate objects.
    Chris Guest

  6. #6

    Default Re: .cshrc

    On Sat, Mar 26, 2005 at 12:55:17AM +0100, Gert Cuykens wrote: 
    > >
    > > Why should anything happen? What did you expect to happen?[/ref]
    >
    > This :)
    >
    > FX-53# cat .cshrc[/ref]

    [snip]

    That was not decription of anything happening. It was just the contents
    of a file. If you meant that you expected that file to be read when
    you started a shell, and that you did start such a shell, then you
    should say so.


     

    Historical reasons mainly.
     

    Whichever one you prefer is obviously the best one for you.
    Personally I prefer zsh. Other people have other preferences.


    --
    <Insert your favourite quote here.>
    Erik Trulsson
    uu.se
    Erik Guest

  7. #7

    Default Re: .cshrc

    On Sat, 26 Mar 2005 01:23:11 +0100, Erik Trulsson
    <uu.se> wrote: 
    > >
    > > This :)
    > >
    > > FX-53# cat .cshrc[/ref]
    >
    > [snip]
    >
    > That was not decription of anything happening. It was just the contents
    > of a file. If you meant that you expected that file to be read when
    > you started a shell, and that you did start such a shell, then you
    > should say so.
    >

    >
    > Historical reasons mainly.

    >
    > Whichever one you prefer is obviously the best one for you.
    > Personally I prefer zsh. Other people have other preferences.
    >[/ref]

    Whats the difference between csh ans sh ?
    Why do you like zsh ?

    Cant be that much difference right ? PS wich shell gives you a command
    over view when you double tab like on a linux box ?
    Gert Guest

  8. #8

    Default Re: .cshrc

    Is .profile read by every shell ?
    Gert Guest

  9. #9

    Default Re: .cshrc

    Is .profile read by every shell ?
    Gert Guest

  10. #10

    Default Re: .cshrc

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2005-03-26, Gert Cuykens scribbled these
    curious markings: 

    No. If it was, users who disdain Bourne shells (like sh, ksh, zsh, and
    the ever-popular bash) for whatever reason (and the reasons are myriad,
    IMO) wouldn't be able to log in. This was alluded to in my post wherein
    I mentioned that sh probably wouldn't be able to read the .cshrc file
    (depending upon what you've placed in it).

    Best Regards,
    Christopher Nehren
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCRLM/k/lo7zvzJioRAk+cAKCUNn8Qj4vRQO5v7FD1LRm2gc1tswCfWHRG
    qfTAothpPrSG3q+69KQDG9M=
    =C3AA
    -----END PGP SIGNATURE-----

    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.

    Christopher Guest

  11. #11

    Default Re: .cshrc

    On Sat, 26 Mar 2005 01:47:13 +0100, Gert Cuykens <com> wrote: 

    AFAIK only "sh" reads ".profile"

    --
    Kind regards
    Abu Khaled
    Abu Guest

  12. #12

    Default Re: .cshrc

    On Sat, 26 Mar 2005 00:53:45 +0000 (UTC), Christopher Nehren
    <apeiron+info> wrote: 
    >
    > No. If it was, users who disdain Bourne shells (like sh, ksh, zsh, and
    > the ever-popular bash) for whatever reason (and the reasons are myriad,
    > IMO) wouldn't be able to log in. This was alluded to in my post wherein
    > I mentioned that sh probably wouldn't be able to read the .cshrc file
    > (depending upon what you've placed in it).
    >[/ref]

    I would like one with allot of colors and a double tab completion that
    shows every command or file :)

    Is bash the only one that does that or can csh do that too ?
    Gert Guest

  13. #13

    Default Re: .cshrc

    Gert Cuykens wrote:
     

    It's for the Bourne type shells (sh, and bash), but I'm
    not into those, so I'm not sure if bash cares about .profile
    or not, or if there's a way to tell it that it should read that.

    IIRC, there's a .bashrc for bash, just as there is, IIRC, a
    ..shrc for sh, the original Bourne shell. (You do know that
    "bash" is an acronym for "Bourne Again SHell", right? A
    play on the English translation of Jesus' words to Nicodemus
    in John III:iii: "Except a man be born again ..." which was
    probably particularly funny in America in the late 1970s...)

    ..cshrc is read by csh/tcsh, which, incidentally enough,
    are the same thing on FreeBSD unless for some reason
    diff(1) is idiotic in this regard:

    [604] Fri 25.Mar.2005 19:48:40
    [kadminarchangel][/home/shared]
    # diff /bin/csh /bin/tcsh

    --- and I suppose that's why there's no .tcshrc AFAIK
    on FBSD.

    HTH,

    Kevin Kinsey
    Kevin Guest

  14. #14

    Default Re: .cshrc



    Hey Gert,
    I use tcsh and have these variables in my .cshrc:

    setenv CLICOLOR_FORCE 1
    set prompt = '%B%n%m:%b%~%# '
    set autolist = ambigous

    It hasn't got a lot of colours but enough to distingiush the files from
    folders etc...
    And autocompletion and hints.
    Arno
     

    FreeBSD Guest

  15. #15

    Default Re: .cshrc

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2005-03-26, Gert Cuykens scribbled these
    curious markings: 

    Uhm, colours where? And why follow Bash's silly example of requiring two
    tabs when you can use one? And why use tab completion which requires two
    tabs and which beeps at you for no reason instead of using ^D completion
    which only requires one instance of ^D and which doesn't beep at you?
     

    No, csh can do this too, despite what seem to be misconceptions about
    csh still being in the dark ages.

    Best Regards,
    Christopher Nehren
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCRMXHk/lo7zvzJioRAl5OAJ423MK2MbD4qD1pDjsIEYVm+yhowgCgqRVM
    OteBGH37ETBUybOSsIZmR0M=
    =Xn6w
    -----END PGP SIGNATURE-----

    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.

    Christopher Guest

  16. #16

    Default Re: .cshrc

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2005-03-26, Kevin Kinsey scribbled these
    curious markings: 

    There's no .tcshrc file, but if you read the manual for csh you'll see
    that there are semantics for processing both files, and that they are
    not equivalent.

    Users who have used Net|OpenBSD will know that having separate files is
    useful, because those systems ship with 4.4BSD csh and have TENEX csh
    (the one that's in FreeBSD) in the ports tree. 4.4BSD csh doesn't read
    the .tcshrc file, which is good if you want to put TENEX csh commands in
    a file without either using ugly if() statements or breaking csh.

    Best Regards,
    Christopher Nehren
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCRMaHk/lo7zvzJioRAqM5AJ4gprZe9EtPZsszSalpkuDCNEF26QCePS8t
    d6/s4xWcfJssagbTKuu8MZc=
    =Fyd1
    -----END PGP SIGNATURE-----

    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.

    Christopher Guest

  17. #17

    Default Re: .cshrc

    I dont have colors :(
    How do you turn off the tab beep ?

    # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
    #
    # .cshrc - csh resource script, read at beginning of execution by each shell
    #
    # see also csh(1), environ(7).
    #

    alias h history 25
    alias j jobs -l
    alias la ls -a
    alias lf ls -FA
    alias ll ls -lA

    # A righteous umask
    umask 22

    set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
    /usr/local/bin /usr/X11R6/bin $HOME/bin)

    setenv EDITOR joe
    setenv PAGER more
    setenv BLOCKSIZE K
    setenv CLICOLOR_FORCE 1

    if ($?prompt) then
    # An interactive shell -- set some stuff up
    # set prompt = "`/bin/hostname -s`# "
    set prompt = "%B%n%m:%b%~%# "
    set autolist = ambigous
    set filec
    set history = 100
    set savehist = 100
    set mail = (/var/mail/$USER)
    if ( $?tcsh ) then
    bindkey "^W" backward-delete-word
    bindkey -k up history-search-backward
    bindkey -k down history-search-forward
    endif
    endif
    Gert Guest

  18. #18

    Default Re: .cshrc



    No. .profile is read up by the sh shell and its derivatives.

    When the csh shell and its derivatives such as tcsh starts,
    its reads up .cshrc. The effect is somewhat the same, but it uses
    the syntax is for csh. The syntax for .profile is for sh.

    The csh shell of more likely not, tcsh, is more friendly for
    interacticve use than the sh shell. Those who like the sh type
    syntax nowdays use the derivative bash as their shell. It is also
    more interactive friendly than plain sh.

    ////jerry
     

    Jerry Guest

  19. #19

    Default Re: .cshrc

    On Sat, Mar 26, 2005 at 10:12:26AM -0500, Jerry McAllister wrote: 

    BTW, why doesn't sh include readline(3) or some other kind of
    command line editing capability? The only reason for using bash
    over sh is for many people the lack of a decent command line editor
    function in sh. Footprint perhaps?
     

    Cheers,
    -cpghost.

    --
    Cordula's Web. http://www.cordula.ws/
    cpghost@cordula.ws Guest

  20. #20

    Default Re: .cshrc

    On 2005-03-26 16:20, ws wrote: 
    >
    > BTW, why doesn't sh include readline(3) or some other kind of command
    > line editing capability? The only reason for using bash over sh is for
    > many people the lack of a decent command line editor function in
    > sh. Footprint perhaps?[/ref]

    It does. You can enable either emacs-style line editing with:

    $ set -o emacs

    or vi-style command line editing with:

    $ set -o vi

    Note though that tab completion is not supported for commands or
    filenames, AFAIK, so you may still want to stick with bash.

    Giorgos Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: February 18th, 01:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139