[CentOS] how to separate individual logs?
hadi motamedi
motamedi24 at gmail.comTue Nov 30 09:07:01 UTC 2010
- Previous message: [CentOS] how to separate individual logs?
- Next message: [CentOS] how to separate individual logs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/30/10, cybernet <cybernet2u at yahoo.com> wrote: >> cat edit.txt | while read LINE; do >> echo "$LINE" | grep -q '>\.\.' >> if [ $? -eq 0 ]; then >> LOGFILE=`echo $LINE | cut -d' ' -f1`.log >> else >> echo "$LINE" >> $LOGFILE >> fi >> done > As you see in the original text file, each module's log is started with the module's name following with '>..' characters so the code is expected to search for the start of each module's log and try to separate its specific log. I tried for the code but it seems that it has some syntax error that needs to be corrected.
- Previous message: [CentOS] how to separate individual logs?
- Next message: [CentOS] how to separate individual logs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list