Hi perl gurus,
I am trying to format a file config.txt with the following sample data
abc=11
abcdefgh=234
a=87
abc_cde=input
khs_neo=230
I need an output as following with spaces/tabs before the "=" and a space after the "="
I tried some options but cannot format it as above. If I try adding tabs on all lines before the "=", it will still be not correct because the tabs need to depend on the number of characters in the first field (before the "=")
Any help is really appreciated.
Thanks,
dbadmin
I am trying to format a file config.txt with the following sample data
abc=11
abcdefgh=234
a=87
abc_cde=input
khs_neo=230
I need an output as following with spaces/tabs before the "=" and a space after the "="
Code:
abc = 11
abcdefgh = 234
a = 87
abc_cde = input
khs_neo = 230
I tried some options but cannot format it as above. If I try adding tabs on all lines before the "=", it will still be not correct because the tabs need to depend on the number of characters in the first field (before the "=")
Any help is really appreciated.
Thanks,
dbadmin