Further explaining the problem Corion pointed out.
In your code, the string you assign to $run_cmd
"./tpsm -rules tpsm_rulesfile_ubuntu -looprf 0 -stop 10 -pspc 1 >logfile.txt "has a trailing space.
That trailing space is the source of the extra space in $logfile when you do the split.
In reply to Re: open file error
by RonW
in thread open file error
by t-rex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |