bash - grep multiple statements from a file -




i have shell program when runs writes logs onto log file. @ end of program , need pick few of lines (start/end/no of records processed- line in log) , push these program (java) . java program needs called once , message lines need passed array.

i have java program ready not sure how grep lines log file , send java program in 1 single call.

there many such programs need call java program , send these lines , hence grep content changes each of program

example, 1 of shell scripts logs below onto log file.at end of shell script after main processing done

the program should grep log file below 3 lines among whole log file , send java program , exit successfully.

java -jar mylog.jar "job_1010" "logger1" "logger2" "logger3"

 [info] [myscript.sh] --- script execution start ...... [info] [myscript.sh] --- records proc : 457  ..... [info] [myscript.sh] --- script execution end 

how can read these log file , pass arguments java program

"job_1010" - sample name of job "loggers 1-3" - these grepped statements log file

note: these sample log statements.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -