Berkeley CSUA MOTD:Entry 22325
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2001/9/6 [Computer/SW/Languages/Web, Computer/SW/Unix] UID:22325 Activity:nil
9/5     DEADBEEF, CAFEBABE, what else.
        \_ D000B015 --pld
        \_  grep '^[a-fo]*$' /usr/share/dict/words   -- misha
            \_ grep -i '^[a-foizsg]*$' /usr/share/dict/words | tr \
               '[a-foOiIzZsSgG]' '[A-F0011225599]'   -alexf&&officehosers
               \_ [] and '' are not needed for tr. -- 0XCF31337
               \_ well if you're gonna go that far you might as well add
                  in the '7' == 'T'... personally I wouldn't go beyond 0,1,5.
                  this problem is not complete until you compile a list of all
                  8-letter combinations.
                  \_ sorry all, I'm dumb... what are we looking for here?
        \_ ABEDBABE
2024/11/23 [General] UID:1000 Activity:popular
11/23   

You may also be interested in these entries...
2008/4/7-12 [Computer/SW/Languages/Web] UID:49681 Activity:nil
4/7     What does this mean and how do I decode it?
        Na "Napvrag" Ncevy Sbby'f cenax ba bhe PRB?
        \_ Don't they teach rot 13 in schools these days?
        \_ copy-n-paste it into: cat | rot13
        \_ 'An "Ancient" April Fool's prank on our CEO?'
        \_ Hope I'm not breakign the DMCA here -- rot13 in tr:
	...
2007/7/6 [Computer/SW/Unix, Computer/SW/Languages/Perl] UID:47196 Activity:high
7/6     my google fu is weak.  How do I match EOF ( tr or perl or sed or any
        linux tool that will do substitutions in a file)? thanks.
        \_ What are you trying to do?
	...
2006/7/12-18 [Computer, Academia/Berkeley/CSUA] UID:43642 Activity:nil
7/13    Is mail working?  Neither incoming nor outgoing mail seems to be
        working.  I've received no email (not even spam) since last night.
        And outgoing mail doesn't seem to be working (or at least it's
        delayed more than a couple minutes).
                I think there are about 50K messages in the queue... -ax
                \_ Is the queue being unqueued.  soda's been up for 3 hours
	...
2005/10/6-9 [Computer/SW/Security] UID:40007 Activity:nil
10/6    What's the easiest way to get the ip from the env var
        SSH_CLIENT="10.10.10.10 1212 22" in bash? I want to use it to
        set the DISPLAY env var.
        \_ see man pages for any/all of: sed, awk, perl, cut, tr (and many
           others).
        \_ Why are you doing this?  ssh will set DISPLAY itself if you
	...
2005/9/24-26 [Computer/SW/Languages/Web, Computer/SW/OS/Windows] UID:39854 Activity:nil
9/24    Any recommendations for extracting text from a WPS file?
        Apparently it was made with MS Works. OpenOffice can't open it
        \_ tr -d "\000-\010\016-\037\177-\377" <  test.wps
	...
2005/8/19-22 [Computer/SW/Unix] UID:39195 Activity:nil
8/19    I have files full of  s that I NEED to squash, nothing I've tried
        works though. (shy of going in with an editor and deleting each one).
        They all exist at the beginning of a line and are followed by another
        strange charcter "»" if that helps.  OS = Linux.
        \_ sed is your friend.
        \_ tr -d
	...
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
	...
2005/1/4-5 [Computer/SW/Unix] UID:35545 Activity:moderate Edit_by:auto
1/4     Hello UNIX command line gurus, let's say I have a file called
        filenames.log that contains file names, like /usr/bin/hello,
        /media/dvd/wayne's world, /media/music/my music!.mpg. I'd like
        to do something like:
        % cat filenames.log | xargs tar rvf /backup/today.tar
        However, I can't do that because I need to escape characters
	...
2004/5/26 [Computer/SW/OS/Linux] UID:30427 Activity:high
5/25    What should I do to remedy this?
        % df
        Filesystem           1k-blocks      Used Available Use% Mounted on
        /dev/sda3            -1022690446876         1         0  33% /
        /dev/sda1            -16257820653         1         0  10% /boot
        /dev/hda1            -5279228168420         1         0  72% /var
	...
2004/1/30 [Computer/SW/Unix] UID:29769 Activity:nil
1/29    sed help.  How do I take a file, and replace all newlines/returns with
        spaces, so that a multi-line file becomes one long line?
        ideally, something like sed "s/$\N/ /g", but this doesn't work.
        \_ need you use sed?  tr works too:  cat /etc/motd | tr -d '\n'
           \_ thanks that rocks.
              \- unless you need to batch process a whole lot of files,
	...
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/3/12-4/20 [Consumer/CellPhone, Computer/HW/Laptop] UID:54057 Activity:nil
3/12    I am curious what others think of tablets like iPad. They don't seem
        useful to me, but I use my computer for more than web browsing,
        Facebook, and Twitter. Why would I buy one instead of a laptop?
        They seem like a disabled laptop to me, but at a higher price.
        \_ You are most likely a coder.  iPad is not for coders.  They are
           what you get your non-technical friends.  Or musicians.  Look at
	...
2011/2/6-19 [Computer/Networking] UID:54028 Activity:nil
2/5     hmm.
$netstat -at | grep LISTEN
tcp        0      0 *:43300                 *:*                     LISTEN
        \_ this is an sshd
tcp        0      0 *:49416                 *:*                     LISTEN
tcp        0      0 *:36201                 *:*                     LISTEN
	...
2009/1/25-29 [Computer/SW/Unix] UID:52456 Activity:low
1/23    may the awesome rootstaff please apt-get install:
        colorgcc, colordiff, colormake
        thanks!
        \_ Done.  In the future email such requests to root@csua for
           faster response
           \_ totally, understood.  Altho yeah I do like asking for
	...
2008/10/14-20 [Computer/SW/Languages/Misc, Computer/SW/Languages/Web] UID:51527 Activity:nil
10/14   2 apache 2.0.52 servers running on Linux boxes.  Identical httpd.conf
        files (except for ServerName).  But on one, if a CGI script takes
        longer than 300 seconds, it times out.  The other, not.  Why is that?
        \_ Perhaps network equipment configuration. Or try comparing settings
           in /proc/sys/net.
           \_ I ran /sbin/sysctl -a | grep tcp, all settings are the same.
	...
2008/9/3 [Computer/SW/Unix] UID:51030 Activity:nil
9/3     Okay, my sed and awk skills are obviously not up to par here.
        I want to only see the "500's" in my apache error log, how do I
        do that? I want to see the whole line, not just the 500 error code.
        Never mind, grep " 500 " is close enough.
	...
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:
	...
2007/9/4-6 [Computer/Rants] UID:47882 Activity:moderate
9/4     Happy Labor Day! Thank you, Labor, for weekends, mandatory breaks,
        and a generally un-serf-like workplace.
        \_ There are a few books coming out about how horrible the
           New Deal was for America.  I love it.
           New Deal was for America.
           \_ There are also books out about how much the Jews control
	...
2007/8/18 [Computer/SW/Unix] UID:47649 Activity:nil
8/17    How to I grep to exclude all lines with more than 1 / ?
        \_ After reading the grep man page:
           grep -v -E '/[^/]*/' myFile
	...
2007/6/12-14 [Computer/SW/Unix] UID:46925 Activity:high
6/12    Inside of a C++ program, I do a "ps | grep usename" for logging
        purposes.  where username = getenv("USER");  Doing this directly is a
        gigantic security hole because someone could set $USER to some command
        line and execute arbitrary code.  What's the best way to make this
        safe?  Is there some standard way to check the input in a case like
        this?
	...
2007/4/13-16 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Perl] UID:46288 Activity:kinda low
4/12    Just finished a programming quiz. Do you think critizing the test
        was OK? They wanted someone to write code for something that could
        be done via shell aliases. This was at Riverbed.
        \_ I assume Riverbed is a company and this was an interview?  If so,
           I think this kind of criticism is a great thing to do.  It shows you
           really know your stuff if you can do both.  If they count that
	...