Hi,
I am new to scripting. I have a log file and need to fetch specific logs and copy to another file.
A copy of the log is like this:
===============================================================
= JOB : server123#jobs1[(0600 08/01/17),(0AAAAAAAAAACA3LL)].jobstream1
= USER : andyc
= Tue 08/01/17 06:01:02 CDT
===============================================================
TWS for UNIX/JOBMANRC 8.5.1
Tivoli Workload Scheduler (UNIX)/JOBINFO 8.5.1 (20091127)
Installed for user "andyc".
Locale LANG set to the following: "en"
Removes files and directories older than -32.
AWSBIS308I End of job
===============================================================
= Exit Status : 0
= System Time (Seconds) : 0 Elapsed Time (Minutes) : 0
= User Time (Seconds) : 0
= Tue 08/01/17 06:01:02 CDT
===============================================================
Now, I need output from first, second, third and last four lines. The lines in the log file are not fixed. And the format I need is like:
Server name: server123 | job: jobs1 | jobstream: jobstream1 | Start Time: Tue 08/01/17 06:01:02 CDT | Exit Status: 0 | Time consumed: 0