3 ms·
In our organization, for comparing two files in custom data format and generating a html file in backend of an internal app. It was using an old bash script(!)
by rottc0dd 6y ago
In our organization, for comparing two files in custom data format and generating a html file in backend of an internal app.
It was using an old bash script(!), to generate the file. I was able learn little awk, and was able to write a 100 line awk script to replicate the same. Apart from the efficiency of the script, which was the main aim, it was impressive how readable and understandable the whole thing became. Some subtle bugs became apparent.
It is not do-all language. Yet, in its small niche, it is very succinct in expressing the text processing ideas. I know it could be done easily in any other language.
A port of bash to awk script :
https://github.com/berry-thawson/diff2html/blob/master/diff2html.sh https://github.com/berry-thawson/diff2html/blob/master/diff2...
https://github.com/berry-thawson/diff2html https://github.com/berry-thawson/diff2html
Original bash counterpart:
https://web.archive.org/web/20180612205114/https://github.com/EugenDueck/diff2html https://web.archive.org/web/20180612205114/https://github.co...
Edit: Changing link and added new links