Hi,
I have had a problem in Linux with the "Fortune" messages (unfortunately!
) and I need to trap the message again. It starts with a "IMPORTANT NOTICE".
To capture this, I write a script as follows..
#!/bin/sh
a=0
while [$a -lt 1000] ; do
/usr/games/fortune >> fortune.txt
a=`expr $a + 1`
done
Now, the file is so big and I haven't been recapture the message yet. So I want to do the following. If the output from the command '/usr/games/fortune' contains the string "IMPORTANT", then I want to store it or else dont. Any suggestions?
Thanks,
OldTrash