Here is a small AWK program that processes the output of the previous script:
#!/usr/bin/awk -f
BEGIN { FS = "\t" }
    val = ""
    for (i = 2; i = NF) {
        print "user_pref(\"" $1  "\", " val ");"

It does the same as, i.e., "adds a preference if there are >=50% [of the prefs.js/user.js files in argument of my previous script] with the same value and there no other value. The output file is already a valid file to include in your profile directory". Using the same four user.js files as earlier, only 60 keys satisfy the constraints: the output is attached.

By the way, all the software I write, including the two scripts in this thread, is under the terms of the GNU General Public License version 3 or any later version.

Reply via email to