Fallowing is the input file that is pipe seperated.
is it possible to generated the report that is alligned left justifed as that of sample output.
I apprecitae your help on this.
InputFile (temp.txt):
108005555|001|christina.lipski||Submitter Signature|2005/05/09-19:16:19:021|2005/05/10-15:52:36:112| eSCR 10744 attachment in REF file
108005555|001|james.m.thompson|Unable to Complete (See Comments)|Initial Change Request Assessment|2005/05/09-19:16:21:794|2005/05/10-15:00:48:486|1 Christina Lipski
~In the body of the change request I cut and pasted Jim Lopez's comments. According to him, the inductance limit is already complete and the eSCR should have been describing a different request to change the process. Read the comment. The eSCR should probably be rejected and re-issued with the proper description.
108005555|001|james.m.thompson||Submitter Signature|2005/05/10-15:00:25:440|2005/05/10-15:00:54:659|0 Mike,
~Do you agree that this eSCR should be reissued by the supplier AND that you should be the change owner?
108005555|001|super user|OK - See Comments|Read the comments and correct me if I'm wrong.|2005/05/10-15:00:27:109|2005/05/10-15:00:53:687| Auto-signoff for Advisor Participant "james.l.lopez" to remove from inbox.
108005555|001|super user|OK - See Comments|Read the comments and correct me if I'm wrong.|2005/05/10-15:00:27:187|2005/05/10-15:00:53:964| Auto-signoff for Advisor Participant "michael.s.thompson" to remove from inbox.
108005555|001|christina.lipski|Complete (See Comments)|Perform additional work on CR|2005/05/10-15:01:00:066|2005/05/10-15:20:26:144| CR cannot be completed. Please reject.
108005555|001|james.m.thompson|Unable to Complete (See Comments)|Initial Change Request Assessment|2005/05/10-15:20:28:870|2005/05/10-15:52:11:597| eSCR that initiated this change request had wrong information. eSCR is rejected.
Output File Should look like
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
USER ACTION TAKEN ASSIGNMENT TIMESTAMP IN SIGNOFF DATE COMMENTS
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
christina.lipski Submitter Signature 2005/05/09-19:16:19:021 2005/05/10-15:52:36:112 eSCR 10744 attachment in REF file
james.m.thompson Unable to Complete (See Comments) Initial Change Request Assessment 2005/05/09-19:16:21:794 2005/05/10-15:00:48:486 1 Christina Lipski~In the body of the change request I cut and pasted Jim Lopez's comments. According to him, the inductance limit is already complete and the eSCR should have been describing a different request to change the process. Read the comment. The eSCR should probably be rejected and re-issued with the proper description.
james.m.thompson Submitter Signature 2005/05/10-15:00:25:440 2005/05/10-15:00:54:659 0 Mike,~Do you agree that this eSCR should be reissued by the supplier AND that you should be the change owner?
super user OK - See Comments Read the comments and correct me if I'm wrong. 2005/05/10-15:00:27:109 2005/05/10-15:00:53:687 Auto-signoff for Advisor Participant "james.l.lopez" to remove from inbox.
super user OK - See Comments Read the comments and correct me if I'm wrong. 2005/05/10-15:00:27:187 2005/05/10-15:00:53:964 Auto-signoff for Advisor Participant "michael.s.thompson" to remove from inbox.
christina.lipski Complete (See Comments) Perform additional work on CR 2005/05/10-15:01:00:066 2005/05/10-15:20:26:144 CR cannot be completed. Please reject.
james.m.thompson Unable to Complete (See Comments) Initial Change Request Assessment 2005/05/10-15:20:28:870 2005/05/10-15:52:11:597 eSCR that initiated this change request had wrong information. eSCR is rejected.
I have tried the fallowing AWK script. did not help me with the correct format.
awk -F"|" '
BEGIN {
print "==========================================================================================================================================================="
printf "%-25s%-25s%-10s%-25s%-25s%-10s\n","USER","ACTION TAKEN","ASSIGNMENT","TIMESTAMP IN","SIGNOFF DATE","COMMENTS"
print "===========================================================================================================================================================\n"
}
{
printf "%-25s %-25s %-10s %-25s %-25s %-10s\n",$3,$4,$5,$6,$7,$8
}
END {
print ""
}
'temp.txt
Edit: I took the liberty to edit your post to make it more readable. Please use [ code ] and [ /code ] tags and empty lines to form paragraphs and to make your code and logs etc. eye friendly, ty.