pearlofperls
Technical User
I'm trying to make sure trailer row of a file matches the count of delimited character in the file.
The command "cut -f 2 -d, TEMPFILE | grep CHARACTER1 | wc -l"
output is 38147
The command "cut -f 2 -d, TEMPFILE | grep CHARACTER2 | wc -l"
output is 64966
Here is the output for tailing the last line of TEMPFILE:
tail -1 TEMPFILE
001,9,MDBK,610,0038147,0064966,O,20070331,025200,P
How would I construct a perl scriptt to be call in a ksh script to ensure the trailer row is correct?
The command "cut -f 2 -d, TEMPFILE | grep CHARACTER1 | wc -l"
output is 38147
The command "cut -f 2 -d, TEMPFILE | grep CHARACTER2 | wc -l"
output is 64966
Here is the output for tailing the last line of TEMPFILE:
tail -1 TEMPFILE
001,9,MDBK,610,0038147,0064966,O,20070331,025200,P
How would I construct a perl scriptt to be call in a ksh script to ensure the trailer row is correct?