[CentOS] how to separate individual logs?
Les Mikesell
lesmikesell at gmail.comWed Dec 1 17:52:10 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 12/1/2010 11:14 AM, John Doe wrote: > From: hadi motamedi<motamedi24 at gmail.com> > >> On 12/1/10, John Doe<jdmls at yahoo.com> wrote: >>> Ok, last try... >>> Did you copy/pasted my code? >>> Did you type it? >>> Saying just that there's a syntax error without showing the code you used >>> does >>> not help... >> Please find below the code that I tried : >> cat Edit3 | tr -d "\r" | 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 >> Please do me favor and correct me on my mistakes. > > I copy/pasted the code above and it works fine... > If I indent it like mine, they are identical. > Check that ftp does not add control chars. > You run it with bash, right? > Ask your sysadmin/colegue to help you. If the first line of the input file used doesn't match the pattern you'd probably get an error in the redirect since $LOGFILE would not be set. -- Les Mikesell lesmikesell at gmail.com
- 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