shell trick question

2006-12-20 Thread Hetz Ben Hamo
Hi, I'm trying to figure out a trick to do in shell, and it goes like this: I have a text file with unknown number of keywords (lets call it keywords.txt), and I have another text file with story (lets call it story.txt). The issue: find if one or more keywords are found inside the story. I

Re: shell trick question

2006-12-20 Thread Valery Reznic
grep -e 'keyword1' -e 'keyword2' ... -e 'keyword N' story.txt Convert from keywords.txt to '-e keyword N' depend on the keywords.txt format, but shouldn't be too difficult. Or may be you looking for pure shell solution, without any externel program invoked ? Valery --- Hetz Ben Hamo [EMAIL

Re: shell trick question

2006-12-20 Thread Peter
foreach word `cat keywords.txt`; do grep -l $word /some/text.file || echo $word: not found done = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo

IO stats per process

2006-12-20 Thread Danny Lieberman
guys How do I get the real IO (block reads/writes per second, not cached) of each process on a running Linux system? vmstat and iostat dont provide process level detail I'm looking at a system right now which is CPU idle but very IO busy and I cant figure out who's moving the disks around.

Re: shell trick question

2006-12-20 Thread Alex Alexander
Simple way to do it: #!/bin/bash for i in `cat $1` do RES=`grep $i $2 | wc -l` if [ $RES -gt 0 ]; then echo $i found in $2 [$RES line(s)]; fi done where $1 = your keywords file and $2 = your story file as parameters eg. (script name: bigscan): # bigscan keywords.txt story.txt gives

Re: shell trick question

2006-12-20 Thread Ira Abramov
Quoting Hetz Ben Hamo, from the post of Wed, 20 Dec: Hi, I'm trying to figure out a trick to do in shell, and it goes like this: I have a text file with unknown number of keywords (lets call it keywords.txt), and I have another text file with story (lets call it story.txt). grep -q -f

Re: shell trick question

2006-12-20 Thread Hetz Ben Hamo
grep -q -f keywords.txt story.txt \ echo Pattern founds in file. Great success! High five! Impressive! Thanks for all who helped. Thanks, Hetz = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in

OT: For trade SUN Ultra-5 and dual PII 400 computers.

2006-12-20 Thread Geoffrey S. Mendelson
I have an Ultra 5 computer I no longer need. It has NO hard drive (will take an IDE drive up to 120gig), a CD-ROM drive, 128m RAM. Runs Linux, xBSD, and Solaris, all available as open source for free. Takes 5v PARITY DIMMS, can be expanded to 512m. 3 PCI slots, VGA type monitor connector,

MySQL conversion question

2006-12-20 Thread Hetz Ben Hamo
Hi, A friend of mine has a MySQL server for a web site and his whole DB is encoded to ISO-8859-1. Now he needs to convert the entire database to UTF-8. So, my question is: has anyone done this before? any good scripts, pointers how he could convert his database from one encoding to another and

Re: MySQL conversion question

2006-12-20 Thread Ira Abramov
Quoting Hetz Ben Hamo, from the post of Wed, 20 Dec: Hi, A friend of mine has a MySQL server for a web site and his whole DB is encoded to ISO-8859-1. Now he needs to convert the entire database to UTF-8. So, my question is: has anyone done this before? any good scripts, pointers how he

Re: MySQL conversion question

2006-12-20 Thread Jonathan Ben Avraham
On Wed, 20 Dec 2006, Hetz Ben Hamo wrote: Date: Wed, 20 Dec 2006 15:30:39 +0200 From: Hetz Ben Hamo [EMAIL PROTECTED] To: linux-il linux-il@linux.org.il Subject: MySQL conversion question Hi, A friend of mine has a MySQL server for a web site and his whole DB is encoded to ISO-8859-1. Now he

KDE Development Instructor

2006-12-20 Thread Noam Rathaus
Hi, We are seeking someone that can come and provide a one day crash-training-course to our development team (skilled in C/C++ and MFC) on how to build good looking KDE applications. --   Noam Rathaus   CTO   1616 Anderson Rd.   McLean, VA 22102   Tel: 703.286.7725 extension 105   Fax:

Re: KDE Development Instructor

2006-12-20 Thread Ira Abramov
Quoting Noam Rathaus, from the post of Wed, 20 Dec: Hi, We are seeking someone that can come and provide a one day crash-training-course to our development team (skilled in C/C++ and MFC) on how to build good looking KDE applications. --   Noam Rathaus   CTO   1616 Anderson Rd.  

Re: MySQL conversion question

2006-12-20 Thread Ilya Konstantinov
On 12/20/06, Jonathan Ben Avraham [EMAIL PROTECTED] wrote: ISO-8859-1 - UTF-8 is a trivial conversion, just move the data. This is only true if your data is Latin-only. Otherwise, this will result in data corruption. In any case, with MySQL 4 and higher, you should update the table scheme

IGLU Site Broken

2006-12-20 Thread Chaim Keren Tzion
http://www.iglu.org.il/IGLU/index.php Returns: Session initialisation failed = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL

Re: IGLU Site Broken

2006-12-20 Thread Shlomi Fish
Hi! On Wednesday 20 December 2006 18:17, Chaim Keren Tzion wrote: http://www.iglu.org.il/IGLU/index.php Returns: Session initialisation failed Fixed now. The problem was this: http://community.postnuke.com/module-Forum-viewtopic-topic-9316.htm It was solved by a REPAIR TABLE command.

Re: IO stats per process

2006-12-20 Thread Tzahi Fadida
Check out the archives. We discussed this in the past. IIRC, you can use echo 1 /proc/sys/vm/block_dump (it might also involve /proc/sys/vm/laptop_mode but i can't remember why). and then tail /proc/kmsg to see the dump of the processes i/o requests. On Wednesday 20 December 2006 12:32, Danny

Re: IO stats per process

2006-12-20 Thread Danny Lieberman
Tzahi Thx - Fair enough - I can look in archives. I may be mistaken, but afaik, there is no /proc/sys/vm/block_dump on Red Hat EL3 - I couldn't find any /proc counters that were per process and all the counters I can see are system-wide. Looking for a real solution today; I started poking

Re: MySQL conversion question

2006-12-20 Thread Doron Shikmoni
Jonathan Ben Avraham wrote: On Wed, 20 Dec 2006, Hetz Ben Hamo wrote: Date: Wed, 20 Dec 2006 15:30:39 +0200 From: Hetz Ben Hamo [EMAIL PROTECTED] To: linux-il linux-il@linux.org.il Subject: MySQL conversion question Hi, A friend of mine has a MySQL server for a web site and his whole DB is