kristo5747
Programmer
I have ASCII files to parse that 48 hours old or more ; I can identify them like so
Some files have a list of hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like so
This grep statement works but it seemingly overrides the find() statement above if I run both at the same time... How can I combine the two statements to create a report that lists the filename and error(s) like so
Is it possible to return "No error" with the file name without error? Thanks in advance for your help.
Code:
find . -name "FILE*TXT" -mtime +1 -exec ls -ltas '{}' ';'
Some files have a list of hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like so
Code:
grep ^err R*VER && echo "No error"
FILEA.TXT:err ->USB 3910 err
FILED.TXT:err No Error
This grep statement works but it seemingly overrides the find() statement above if I run both at the same time... How can I combine the two statements to create a report that lists the filename and error(s) like so
Code:
FILEA.TXT Button 3320 err
FILEB.TXT USB 3235 err
FILEC.TXT IR Remote 2436 err
FILED.TXT No error
Is it possible to return "No error" with the file name without error? Thanks in advance for your help.