error handling ">" within string
Brought to you by:
toddatkins
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.