Berkeley CSUA MOTD:Entry 35612
Berkeley CSUA MOTD
2017/10/16 [General] UID:1000 Activity:popular

2005/1/9 [Computer/SW/Unix] UID:35612 Activity:moderate
1/8     Does anybody know if there is a very simple way to see
        what files in a file list DONT have <string> in it.
        I mean sort of like a combination of grep -v and grep -l.
        There are various simple loops foreach $files grep string > /dev/null
        || echo $f or make a copy and grep -l string * | xargs rm and then
        see what is left. But I was looking for a single command or something
        more elegant.
        \_ grep -L ?  -L is right above -l in the man page...
           \_ or just grep -vl.
              \- grep -vl is not right. hmm, i guess -L is a new GNU option
                 not in "grep classic". "new" of course is relative. tnx.
                 \_ grep -vl works on both solarisa and linux.
                    \- it works, but it doenst do the right thing ...
                       for gnu grep running on solaris:
                       moon# ls | wc
                            338     338    2703
                       moon# grep -l XXXX * | wc
                            119     119     785
                       moon# grep -L XXXX * | wc
                            219     219    1918
                       moon# grep -vl XXXX * | wc
                            338     338    2703
2017/10/16 [General] UID:1000 Activity:popular

You may also be interested in these entries...
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.
        \_ Couldn't open wall log!: Bad file descriptor
           Could not open wall subscription directory /var/wall/ttys: No such file or directory
2011/11/20-2012/2/6 [Computer/SW/Unix, Computer/Companies/Apple] UID:54237 Activity:nil
11/20   Are there tools that can justify a chunk of plain ASCII text by
        replacing words with words of similar meaning and inserting/removing
        commas into the text?  I received a 40-line plain text mail where
        all the lines are justified on left and right.  Every word and comma
        is followed by only one space, and every period is followed by two
        spaces.  The guy is my kid's karate instructor which I don't think is
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