First Line=1
Second Line=2
And the third Line=3
Now comes the fourth Line=4
I want to insert spaces so that the output would be
First Line[3 tabs]=1
Second Line[3 tabs]=2
And the third Line[2 tabs]=3
Now comes the fourth Line[1 tabs]=4
Can anyone help me do this , Basically the number of tabs should be dynamic depending on the longest line so that all = signs appear on the same vertical column in the output ..
This doesn't help , it puts one space before and after "=" . if the number of words before = sign are not of equal length then the spacing would not be proper
I think that Radoulov's solution above is the best one as it calculates the maximum line length before formatting it. I am not sure that I understand the advantage of manipulating the ARGV variable compared to this: