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

2003/4/14-15 [Computer/SW/OS/Windows, Computer/SW/Languages/Misc] UID:28114 Activity:high
4/14    I need to write a script to run under DOS (yes, I know it sucks)
        and I need it to stop a program that can only be terminated by
        hitting Control-C. How can I give that to the script as a
        command? Thanks.
        \_ try installing cygwin (cygwin.com ?) and use their "ps" and
           "kill" functions?
        \_ Is it a true DOS platform, or a DOS window in a windows environment?
                \_ a DOS window in Windows      -op
        \_ You could write a vb function that runs your script and sends key
           strokes to the window.  though you'll have to write code to get the
           handle to the window.
        \_ Or put a timer in your program that you wrote that exits after
           10 seconds.
        \_ what are you smoking, DOS is not a multithreaded environment
        \_ grab one of the freebie or shareware keyboard/macro programs off
           the net.  Since you're in windowed dos you can get away with a
           stunt like this.  There is also 4Dos which can probably do what
           you need.  It's a command shell replacement for command/cmd.  You
           can also install perl and then use the plist and pkill and other
           stuff MS provides in some freebie package.  If you give more
           details you'll get better answers.
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2012/3/15-6/1 [Computer/SW/Languages, Computer/SW/OS/Windows] UID:54340 Activity:nil
3/15    Why does MS put double-quotes around the '8' in Windows Server 8, like
        the following?
        - Windows 8
        - Windows Server "8"
        \_ Because when they didn't do it, code didn't see the '\0'
           and went over?  Looks better than '8','\0' *shrug*
	...
2009/4/17-23 [Computer/SW/OS/FreeBSD] UID:52867 Activity:low
4/17    If you have a general access AssOS machines, this is worth
        taking this seriously. --psb
  http://c-skills.blogspot.com/2009/04/udev-trickery-cve-2009-1185-and-cve.html
        <DEAD>admin.fedoraproject.org/updates/udev-127-5.fc10<DEAD>
        \_ What does this have to do with MS Windows?
           \_ psb is a bsd lover.
	...
2008/4/2-6 [Computer/SW/OS/OsX] UID:49647 Activity:nil
4/2     I'm running Windows.  How do i get cool virtual desktops
        like on a mac or 100 million other Unix window managers?
        \_ 2 minutes of googling should get you some answers.
           MS has a "powertoy" for this.
        \_ VMware Workstation?
	...
2008/2/1-7 [Computer/Companies/Google, Computer/SW/OS/Windows] UID:49047 Activity:kinda low
2/1     MS tries to buy Yahoo
        \_ GOOG 514.60  -49.70
           :-)
           I'm not the "short GOOG" guy, just someone who envies Google
           employees.
        \_ Official buyout letter from MSFT http://tinyurl.com/3ysrzu
	...
2007/7/10-16 [Computer/Companies/Apple] UID:47242 Activity:high
7/10    My girlfriend downloaded music from iTunes onto another computer,
        which we do not have access to anymore. Apple has record of the
        purchases through the "Purchase History" option, but their policy
        is that you can only download once. I never realized that. WTF?!
        Why would they have such a policy when they clearly know what she
        bought? Has anyone sued them over this? We have so many songs in
	...
2007/5/25-28 [Computer/HW/IO] UID:46749 Activity:low
5/25    Happy towel day.  Question:  does anyone know of a Windows screen
        saver that displays the user desktop as it is, including showing
        updates (such as from logfile scrolling by in an application, etc.)
        but works with the normal MS screen lock function?  -John
        \_ If the screen saver displays the desktop as it is, how does it save
           the screen?
	...
2007/5/13-14 [Computer/SW/OS/Windows] UID:46613 Activity:nil
5/13    Someone please give us a 411 on Windows Vista? Is activation
        tougher than WinXP sp2? Is it impossible to get around now forcing
        you to pay for upgrades? Let me just say that I don't like Windows
        OS.  I don't mind using Microsoft Word, Excel, and Powerpoint,
        and they actually make decent games. However, for over a decade
        I've been sucked into using Windows3.0/95/98/2K/XP because
	...
2007/4/13-16 [Computer/SW/WWW/Browsers] UID:46291 Activity:nil
4/13    I use IE7 to browse a web site, and the server says the UserAgent
        string is
        "UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET
        CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
        Is MS bowing to the Mozilla community?
        \_ What are you talking about?  IE has always reported its UserAgent
	...
2006/11/3-4 [Computer/SW/WWW/Browsers] UID:45153 Activity:nil
11/3    In my WinSock.h for v1.1 (dated 6/4/02), there is this line:
                #define AF_FIREFOX      19              /* FireFox */
        What is that???  FireFox socket address family?
        \_ It is a hack MS put into the windows network stack back in '02 to
           slow down FireFox network connections.
	...
2006/10/31-11/2 [Computer/SW/OS/Windows] UID:45057 Activity:moderate
10/31   A friend of mine said he's loving Microsoft again because Bill G
        is starting to donate all of his money to charity. He's boycotting
        Google, Yahoo, and other mega companies because they're too big and
        too power and thinks they're all becoming the old Microsoft, whereas
        Microsoft has recently done a lot of good things like investing in
        education and charity. He just paid for a copy of Microsoft Windows
	...
2006/9/12 [Computer/SW/OS/Windows] UID:44358 Activity:nil
9/12    I haven't used MS windows since the win95 days. Can someone please
        explain to me what in the world a "domain" is? I'm familiar with
        IP addresses like 128.32.112.233 or domains like http://csua.berkeley.edu
        but what are things like "\\My Workgroup" or "\\MYCOMPANY"?
        Is Microsoft inventing new linguo?
	...
2006/6/14-16 [Computer/SW/Mail] UID:43388 Activity:nil
6/14    I've thrown together an LDAP cgi to let people update their
        phone numbers in active directory.  Small problem: Outlook
        no longer grabs the "facsimileTelephoneNumber" attribute
        for Business Fax.  It sees that attr as "Other Fax".  Does
        anyone know what attribute Outlook is looking for now for
        "Business Fax".  This is Outlook 2003/Exchange 2003/Windows 2000
	...
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/5/8-6/4 [Computer/SW/Unix] UID:54383 Activity:nil
5/8     Hello everyone!  This is Josh Hawn, CSUA Tech VP for Spring 2012.
        About 2 weeks ago, someone brought to my attention that our script
        to periodically merge /etc/motd.public into /etc/motd wasn't
        running.  When I looked into it, the cron daemon was running, but
        there hadn't been any root activity in the log since April 7th.  I
        looked into it for a while, but got lost in other things I was
	...
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/7/30-8/10 [Computer/SW/Languages/Misc] UID:54148 Activity:nil 66%like:54150
7/29    Happy Sysadmin Day
        \_ our "sysadmin" today deleted /home. When we asked her why
           she said she didn't do it. When I checked the sudo logs,
           I found these two commands in order:
               COMMAND=/bin/rm -r /home testuser
               COMMAND=/bin/rm -r /home/testuser
	...
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
	...
2010/4/22-5/10 [Computer/SW/Languages/Misc] UID:53797 Activity:nil
4/22    In Linux is there an easy way to rename the scripts in /etc/rc?.d ?
        For example I want to set all the /etc/rc?.d/S91apache to S100apache
        so that it'll run the ramdisk BEFORE going to apache.
        \_ Sure, just move them.
           \_ I mean is there a script that will rename all of them
              for me? Like: setrc apache2 0 0 1 1 1 1
	...
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
	...
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/5/5-6 [Computer/HW/Laptop] UID:52950 Activity:moderate
5/5     Is there a good (or standard) way to make an offline copy of a w
        ordpress blog (mine, not someone else's)? tia.
        \_ oh man.
           \_ I could cobble something together with curl / wget, but I'd
              rather not if there is a standard way of doing this.  I'm
              pretty new to wordpress / blogging and I just want to keep
	...
2009/2/10-13 [Computer/SW/Security, Computer/SW/Unix] UID:52552 Activity:nil
2/10    I have an sh file that does a mount.. the mount does an
        authentication. I previosly stored the username and password
        from zenity prompts. However, I can't get a return on the password
        field. The following only works on the username:
        mount -t davfs "http://blahblah.com/BLahUser11" /mountdir << EOF
        ${username}
	...
2009/1/14-22 [Computer/SW/Languages/Perl, Computer/SW/Languages/Misc] UID:52378 Activity:nil
1/13    I want to extract a couple integer from an xml file, mainly,
        xml file from http://weather.com so I can put it on my xplanet marker
        file. has anyone done similar things (parse and extract data
        from xml) using shell script instead of python/perl?
        in the world of perl, it make sense to dump things into a hash
        which i can easily extract key/value pair.  can i achieve similar
	...
2008/12/18-2009/1/7 [Computer/SW/Mail] UID:52279 Activity:nil
12/18   Campus USENET service will be terminated on 12/31.
        http://ls.berkeley.edu/mail/micronet/2008/1608.html
        \_ I emailed RobR to tell him. -ausman
        \_ The CSUA is considering asking campus to allow us to run NNTP for
           ucb.class.*, as bSpace sucks major major ass. Thoughts? --t
           \_ That's noble, but maybe the effort would be better spent
	...
Cache (881 bytes)
cygwin.com
Run this program any time you want to update or install a cygwin package. Only the base cygwin distribution is installed by default. For instance, clicking on the "Default" field next to the "All" category will provide you with the opportunity to install every Cygwin package. Be advised that this will download and install hundreds of megabytes to your computer. The best plan is probably to click on individual categories and install either entire categories or packages from the categories themselves. Please do not send personal email with "quick questions" to individual cygwin developers. The cygwin mailing lists are the places for all questions. Not responsible for errors in content, meaning, tact, or judgement. UNIX is a registered trademark of the Open Group in the United States and other countries. IF YOU SEND EMAIL TO THIS ADDRESS YOU WILL BE AUTOMATICALLY BLOCKED.