Berkeley CSUA MOTD:Entry 37200
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2017/12/16 [General] UID:1000 Activity:popular
12/16   

2005/4/15 [Computer/SW/Unix] UID:37200 Activity:very high
4/15    Unix Wizards, how would I sort a list like this in numerical order?
        I can't figure our the sort syntax.  I am not a programmer!
        +0.04gb
        +0.11gb
        +1.98gb
        +10.94gb
        +17.88gb
        +2.72gb
        +21.02gb
        +3.31gb
        \_ The regular "sort -n" will work, except you need to remove the
           plus signs first: tr -d + | sort -n     --mconst
           \_ I am trying to figure out how to sort in that format!
              Otherwise I will have to sort and then re-add the plus
              sign and that seems lame.
              \_ newsflash: you seem lame.
              \_ whine whine whine.
                 \_ OP already said he's not a programmer.
                    \_ and using unix utilities is not programming.
                       \-gee maybe we should give an awk test before
                         giving people sloda accounts.
                         giving people sloda accounts. obviously "not
                         programmer" = casual unix user. i've met people
                         who are technical people who never thought about
                         the fact you could "grep a web page" by doing
                         soemthing like lynx -dump | grep, so things
                         obvious to some arent necessarily immediately
                         obvious to others.
           \_ How about:  sort -t "+" +1 -n <filename>
              \_ Yeah, as long as the sign's always +, that's simpler.
                 (You could also do "sort -n +.1".)  --mconst
        \_ cat file.txt | perl -ne 's/^\+/ /g;print;' | sort -n |
           perl -ne 's/^ /+/g;print;'
        \_ sed 's/+/ /' file.txt | sort -n | sed 's/^ /+/'
           \- those are redarded. learn to use sort, if it is in a shell
              script and not already in a perl data structure or some such.
              \_ Oh fuck you.  Those handle negative numbers too.
                 \_ so does sort -t + +1 -n <file> | sort -t - +1 -n -s -r
                    \_ Wow, and I always know what the -s and -t options for
                       sort do.  Not to mention - and +
                       \_ That's what man pages are for, man.  sometimes it
                          does pay off to reinvestigate old tools....
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2017/12/16 [General] UID:1000 Activity:popular
12/16   

You may also be interested in these entries...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/8/30-11/7 [Computer/SW/Unix, Computer/SW/Apps] 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 [Finance/Investment, Computer/SW/Unix] 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/3/29-6/4 [Computer/HW/Memory, Computer/HW/CPU, Computer/HW/Drives] UID:54351 Activity:nil
3/29    A friend wants a PC (no mac). She doesn't want Dell. Is there a
        good place that can custom build for you (SSD, large RAM, cheap video
        card--no game)?
        \_ As a side note: back in my Cal days more than two decades ago when
           having a 387SX made me the only person with floating-point hardware,
           most machines were custom built.
	...
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
	...
2012/1/27-3/26 [Computer/SW/Unix] UID:54299 Activity:nil
1/27    Interesting list of useful unix tools. Shout out to
        cowsay even!
        http://www.stumbleupon.com/su/3428AB/kkovacs.eu/cool-but-obscure-unix-tools
        \_ This is nice.  Thanks.
	...