Berkeley CSUA MOTD:Entry 20650
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/27 [General] UID:1000 Activity:popular
5/27    

2001/2/22-23 [Computer/SW/Unix] UID:20650 Activity:high
2/22    Is there any advantage of tcsh over bash? I've always used tcsh for
        my shell and sh for programming. I'm wondering if tcsh has anything
        (other than automatically setting $REMOTEHOST) that bash doesn't.
        \_ one thing I like about tcsh that bash doesn't have is you can hit
          ^D on an attempted file complete, and it will list possible
          completions.  Pretty useful if you dont remember the exact file name
          and dont want to have to abort and retype a commandline just to
          do a 'ls'. (well this isn't a default bash option, it may exist,
          I just find it easier to 'exec tcsh' than 'man bash') -ERic
          \_ in bash, you hit tab twice.  $ ls foo^I^I[expansion list returned]
             but you can get this particular interface in tcsh as well.  I
             imagine it's a holdover from csh filec. --jon
             \_ If you put "set show-all-if-ambiguous on" in .inputrc you will
                need to hit tab only once in most cases.
        \_ tcsh has a convenient %~ option for the prompt.  Does bash have
           a similarly simple counterpart?
           \_ what does the '%~' option do?
              \_ it prints your current working directory with respect to
                 your home directory (e.g.: ~user/somedir).  man tcsh
                 \_ Of course bash can do silly things like that. You can
                    put about anything in your prompt. man bash
                    \_ I did man bash and didn't see anything about this.  Is
                       there way to do it that is as simple as in tcsh?  And
                       as far as "silly things" goes, realistically, I think
                       that as far as important (ie, "non-silly") features go,
                       bash/tcsh/ksh are about the same, so it's the little
                       things that make the difference.
                       \_ PS1="\u@\h:\w\\$ "
                          \_ this only works for directories off of your own
                             home dir, not off of other users'.
                 \_ okay. I use ksh, I'd use bourne shell if I could hack
                    in filec and arrow keys for history. This sort of
                    stuff is frivolous.
        \_ Use zsh.  The best of both worlds.  (In fact, all most all of both
           worlds)
           \_ /sbin/sh is the STANDARD shell! Real men know how to type and
              don't need fancy line editing. Use Bourne Shell as God and Steve
              Steve intended. Though Korn Shell is the spawn of the Devil and
              David Korn, its use can be tolerated on systems with clueless
              admins who think that /bin/csh (Bill must have been intoxicated
              or stoned when he wrote this) is the best thing since DECNET
              and LAT came out.
                \_ LAT! LAT is the STANDARD protocol!
2025/05/27 [General] UID:1000 Activity:popular
5/27    

You may also be interested in these entries...
2012/8/30-11/7 [Computer/SW/Apps, Computer/SW/Unix] UID:54470 Activity:nil
8/30    Is wall just dead? The wallall command dies for me, muttering
        something about /var/wall/ttys not existing.
        \_ its seen a great drop in usage, though it seems mostly functional.
            -ERic
        \_ Couldn't open wall log!: Bad file descriptor
           Could not open wall subscription directory /var/wall/ttys: No such file or directory
	...
2012/9/20-11/7 [Computer/SW/Unix, Finance/Investment] UID:54482 Activity:nil
9/20    How do I change my shell? chsh says "Cannot change ID to root."
        \_ /usr/bin/chsh does not have the SUID permission set. Without
           being set, it does not successfully change a user's shell.
           Typical newbie sys admin (on soda)
           \_ Actually, it does: -rwsr-xr-x 1 root root 37552 Feb 15  2011 /usr/bin/chsh
	...
2012/9/24-11/7 [Computer/SW/Languages, Computer/SW/Unix] UID:54484 Activity:nil
9/24    How come changing my shell using ldapmodify (chsh doesn't work) doesn't
        work either? ldapsearch and getent show the new shell but I still get
        the old shell on login.
        \_ Scratch that, it magically took my new shell now. WTF?
           \_ probably nscd(8)
	...
2012/4/27-6/4 [Computer/SW/Languages/Misc, Computer/SW/Unix] UID:54372 Activity:nil
4/27    I wrote a little shell script to collect iostat data:
        #!/bin/bash
        DATE=`date +%m%d`
        DATADIR=/var/tmp/user
        OUTPUTFILE=$DATADIR/$DATE.out
        while true
	...
2011/11/20-2012/2/6 [Computer/Companies/Apple, Computer/SW/Unix] UID:54237 Activity:nil
11/20   Are there tools that can justify a chunk of plain ASCII text by
        replacing words with words of similar meaning and inserting/removing
        commas into the text?  I received a 40-line plain text mail where
        all the lines are justified on left and right.  Every word and comma
        is followed by only one space, and every period is followed by two
        spaces.  The guy is my kid's karate instructor which I don't think is
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...