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

2004/1/28 [Computer/SW/Unix] UID:11976 Activity:low
1/27    In TCSH when i type part of a command and do ESC-p, it searches
        backwards in the command history and matches and completes the last
        command corresponding to the partial command I have typed.  When
        I do the same thing in BASH, it prints a ":".  How do I get the
        history-search-backwards/forward in BASH?  THANKS!
        \_ man bash;  Look for the section on Searching.
        \_ in bash and zsh, use C-r/C-s for emacs-style reverse/forward
           incremental search.
           \_ zsh also supports tcsh-style history-search-backward, if you
              want that.
        \_ Don't listen to these heathen.  tcsh is the One True Shell!  Bash
           is what linux weenies use because, well, uhm, Linus uses it so it
           must be the best!
           \_ Ranting aside, bash really is quite shitty.  There's no real
              reason to be running it with all the other options out there.
              It tries to be everything to everyone, and ends up being
              internally inconsistent.
                \_ Bash is the only shell that is useable for interactive
                   sessions, features a bourne-compatible syntax and ships
                   by default on Solaris, most Linux distros and MacOS X.
                   The only other option for interactive sessions is ksh,
                   which isn't available by default on most Linux distros
                   and MacOS X. (Before you say just d/l ksh or whatever
                   other shell, try to keep in mind that some of us have
                   to use systems where we cannot install/execute software
                   that isn't approved or isn't part of the default
                   install, so we have to be familiar with the tools that
                   are almost always present).
                   \_ Based on the descriptions online, I'm having trouble
                      seeing what makes bash interactive and tcsh not and, FTM,
                      what's the big deal about being interactive. Apologies
                      for lack of clue.
                   \_ Could somebody do me a favor and tell me what the word
                      "interactive" means in this context. Apologies for my
                      lack of clue but it's not like the thing can talk to you.
                   \_ Why is it the only one usable?
                      \_ It doesn't have a builtin spell checker, we know that
                         from his post, heh.
                   \_ bourne syntax is better for programming, not for
                      interactive use.
                      \_ kinda cool how the pro-bash clone eliminated dozens
                         of other options as if his opinion was fact.  i like
                         him.  he'll do well on the motd.
                                \_ tcsh has no advantages over bash (save a
                                   memory footprint of ~ 200kB, which is
                                   meaningless these days). The fact that
                                   it uses c-shell syntax is a huge drawback.
                                   Some of us do use if, for, while on the
                                   command line.
                                   \_ tcsh has plenty of advantages over bash;
                                      better interactive syntax, for one.
                         \_ name some other options that are available by
                            default on most systems.
                            \_ tcsh
                                \_ what part of "cannot install/execute software
                                   that isn't approved or isn't part of the
                                   default install" didn't you understand?
                            \_ it's not really hard to install your own shell
                               locally and run it from whatever PoS login
                               shell you're given (example: bash).
              \_ Since Panther, I've been using bash and I don't esp. like
                 it, but i can't figure out if I don't like it out of
                 lazyness/acustomedness to tcsh or some other reason.
                 Which shell do you recommend? zsh?
                 \_ I would have switched to zsh a long time ago if I wasn't
                    such a lazy fuck.
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
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/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
	...
2011/5/19-7/30 [Computer/SW/Security] UID:54110 Activity:nil
5/19    Uh, is anyone still using this? Please mark here if you post and
        haven't added this yet. I'll start:
        \_ person k
        \_ ausman, I check in about once a week.
        \_ erikred, twice a week or so.
        \_ mehlhaff, I login when I actually own my home directory instead of
	...
2011/5/19-7/13 [Computer/SW/Languages/Misc] UID:54115 Activity:nil
5/19    If script A runs, and calls script B ..... is it possible for me to exit\
        script A based on results of script B and not continue?
        \_ assume any shell
        \_ Yes.
           \_ without passing the result to some stupid temp file?
              \_ It sounds like you want "scriptb || exit", which will run
	...