Ich möchte server.log Analyse für Fehler und ich möchte vor 10 Zeile und nach 10 Zeile dieses Fehlers so unter Skript geben Fehler in Hp-ux, bitte bieten alternative Lösung :Problem im Skript für Server-Log-Analyse
grep -A 10 -B 10 "ERROR" server.log >> /tmp/Test.log
seine hp-ux so -A10 und -B10 funktioniert nicht. –
können Sie zeigen, welcher Fehler kommt? –
grep: illegale Option - A grep: illegale Option - 1 grep: illegal Option - 0 grep: illegal Option - B grep: illegale Option - 1 grep: illegal Option - 0 grep : illegale Option - P Verwendung: grep [-E | -F] [-c | -l | -q] [-bhinsvwx] -e Musterliste ... [-f Musterdatei ...] [Datei .. .] Verwendung: grep [-E | -F] [-c | -l | -q] [-bhinsvwx] [-e Musterliste ...] -f Musterdatei ... [Datei ...] Verwendung : grep [-E | F] [-c | -l | -q] [-bhinsvwx] Muster [Datei ...] –