Berkeley CSUA MOTD:Entry 53475
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/04/03 [General] UID:1000 Activity:popular
4/3     

2009/10/27-11/3 [Computer/SW/Unix] UID:53475 Activity:nil
10/27   http://www.maxgames.com/play/flash-mind-reader.html
        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
        \_ ksh -c 'for ((i=0;i<10;i++)); do for ((j=0;j<10;j++)); do echo "$i$j-\
($i+$j)" | bc; done ; done' | uniq
           \_ fixd.  above script only works if your sh is really bash.
              -Solaris Geek
              \_ sorry, I somehow lost the k.  Also, works if your sh is ksh93
                 in opensolaris, etc.  Not sure that putback has made it into
                 s10u*
        \- i thought that was pretty clever presentation. thanks for sharing
           the link.
2025/04/03 [General] UID:1000 Activity:popular
4/3     

You may also be interested in these entries...
2013/8/22-10/28 [Computer/Companies/Yahoo, Industry/SiliconValley] UID:54732 Activity:nil
8/22    http://marketingland.com/yahoo-1-again-not-there-since-early-08-56585
        Y! is back to #1! Marissa, you are SEXY!!!
        \_ how the heck do you only have 225M uniq vis/month when there
           are over 1 billion internet devices out there?
           \_ You think that every single Internet user goes to Y!?
        \_ Tall blonde skinny pasty, not my type at all -former Y!
	...
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
	...
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.
	...
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" ]
                then
	...
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
        Password:
        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:
	...
Cache (435 bytes)
www.maxgames.com/play/flash-mind-reader.html
Bookmark this page Game Controls : Click Blue Button: Read your Mind! Description: Choose any two digit number, add both digits and then subtract the total from your original number. Example if you chose 23: 2+3 = 5 minus 5 will give you your answer. Once you have your answer click the blue button, your so predictable I knew you'd pick that. Once you have your answer click the blue button, your so predictable I knew youd pick that.