![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| simultaneously create three empty files? | na5m | Shell Programming and Scripting | 4 | 06-14-2008 01:20 PM |
| How to parse 2 files simultaneously | Awanka | Shell Programming and Scripting | 8 | 04-12-2007 09:00 PM |
| cp & mkdir simultaneously | enuenu | UNIX for Dummies Questions & Answers | 5 | 03-13-2007 05:29 AM |
| Running 2 apaches simultaneously | sx3v1l_1n51de | SUN Solaris | 2 | 07-22-2005 11:56 AM |
| tailing logs | squeakywheel | UNIX for Dummies Questions & Answers | 1 | 07-05-2004 03:22 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Tailing 2 or more log files simultaneously PERL
Hi,
I am having issue where I have to tail 3 log files continuously (forever) and while I am reading the files , parse them and shove the data into DB. I can do this with one file totally fine but how can I read 3 files at the same time? I am not really looking for code (but would be nice) but maybe a brief summary of the solution. Btw: I am doing this in perl. Any help is highly appreciated ![]() Thx. |
|
||||
|
Not sure how to do it in perl but in shell scripting, I'd create a function that would read/parse the file: Code:
parseFile () {
fileNm=$1
do something...
}
then I would call the function all at once in the script... Code:
parseFile "file1" & parseFile "file2" & parseFile "file3" & wait etc. Gianni |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|