Berkeley CSUA MOTD:Entry 53586
Berkeley CSUA MOTD
2018/01/21 [General] UID:1000 Activity:popular

2009/12/9-2010/1/13 [Computer/SW/Unix] UID:53586 Activity:nil
12/8    Is there a bash equivalent to tcsh's history-search-backward ?
        \_ There's something similar called... history-search-backward. It
           is a bit more limited, in that it only searches for strings and
           not glob patterns. You may find reverse-i-search to be useful also.
2018/01/21 [General] UID:1000 Activity:popular

You may also be interested in these entries...
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:
        DATE=`date +%m%d`
        while true
2009/10/27-11/3 [Computer/SW/Unix] UID:53475 Activity:nil
        how does this work?
        \_ sh -c 'for ((i=0;i<10;i++)); do for ((j=0;j<10;j++)); do echo "$i$j-(\
$i+$j)" | bc; done ; done' | uniq
        \_ bash -c 'for ((i=0;i<10;i++)); do for ((j=0;j<10;j++)); do echo "$i$j\
-($i+$j)" | bc; done ; done' | uniq
2009/8/18-9/1 [Computer/SW/Unix] UID:53284 Activity:nil
8/18    Is it possible to truncate your path name in your prompt in tcsh?
        Tsch veterans REPRESENT!  I know this is how to do it in bash:
        # truncate path: returns $1 truncated to $2 chars, prefixed with ...
        truncate_path () {
                if [ -z "$1" -o -z "$2" ]
2009/8/19-9/1 [Computer/SW/Unix] UID:53285 Activity:nil
8/18    Hi again, new freebsd guy here again, in bash I was able to go
        LD_LIBRARY_PATH=/opt/foo/lib ./runmyapp
        I managed to do this in tcsh by using setenv in a shell script
        that setenv's the lib path and then executes $1, just wondering
        if there was a way to do it in 1 line from the cmd line as in bash?
        Thanks, btw %2c or %3c worked.  Freebsd, tcsh and vi forever!
2009/1/5-8 [Computer/SW/Unix] UID:52313 Activity:kinda low
1/3     no hurry but do you know of:
        $ chsh
        Enter the new value, or press return for the default
         Login Shell [/usr/local/bin/bash]: /bin/zsh
        failed: Insufficient access
2008/11/24-28 [Computer/SW/Unix] UID:52090 Activity:nil
11/23   How do you find the max # of forkable threads in a unix
        environment? Is it system or user based?
        \_ getrlimit, or ulimit -a (in bash)
2008/8/18-21 [Computer/SW/Unix] UID:50894 Activity:kinda low
8/18    How long has the command "seq" been around? I just saw it in
        one of my coworkers shell scripts and wish I had known about it
        years ago...
        \_ what does it do?  - bash fan #1
           \_ It prints out a sequence of numbers from FIRST to LAST in
              a specified increment.
2008/7/14-16 [Computer/SW/Languages/Perl, Computer/SW/Unix] UID:50557 Activity:moderate
7/14    Shell Programming question: I want to call a script with 1 arg
        and have it figure out whether $1 is a MAC address or an IP address
        and then do call the appropriate function.  What is the best way
        to do this, given that sh/bash/ksh do not have something like
        the =~ in perl.  Check for exit status of grep, or is there a
        a better way?  For the moment, let's just say the two tests are: