Given a big file (~1.000.000 lines) with the following format:
After processing the result should be
The last element in a line always contains the language. The format of this element is free to choose, for demo purposes it is
The placeholder to replace with the language
$LANG is also free to choose.
Removing the last entry in the array is not the big deal, I'm really looking for a solution for replacement..
If possible I'm looking for a solution that does not require bash to iterate over the whole file, maybe something with awk/sed/grep (because of speed)