- 论坛徽章:
- 0
|
成功的样例
wld.log
Table CIN_CAPACITY_INFORMATION_NEW:
312 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
如果下面这三行都是以0开头,表示没有失败的记录,即全部成功,如何用grep命令表示
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
失败的样例
wld.log
Table CIN_CAPACITY_INFORMATION_NEW:
310 Rows successfully loaded.
2 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
如果下面这三行只要有一行不是以0开头,就表示有失败的记录,即表示失败
0 Rows not loaded due to data errors.
2 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
可以用表示 grep -i "[1-9] rows not loaded"
请问我如何用grep命令动态地表示成功或是失败呢? 即要输出表示这个日志是成功了还是失败了,不知如何实现,请指教 |
|