Menu

#29 error handling ">" within string

v1.0 (example)
open
nobody
5
2005-05-16
2005-05-16
jyc9999
No

I was using swatch to monitor a log file on my Fedora
Core 2 machine. Whenever the log file is added with new
information, swatch will check the pattern of the
string, and if it matches, it will call a perl file
with one argument of that string.

The log file sometimes contains a string like this "123
-> 342", I have "exec perl game.pl $_", which $_ is
that "123 -> 342" string.

The result of passing this string is the following"
1. It creates a file named "342"
2. it runs the game.pl with the substring "123 -", and
put the result in the file "342".

Strings with the ">" will work perfectly as I expected.

Any solution for this problem? Thank you.

Discussion


Log in to post a comment.

Monday.com Logo